liveBook · Manning

Run instruction

As explained in Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more

The RUN directive executes a command in an intermediate container during image construction.

The RUN instruction executes a command inside a temporary container during image construction. Podman applies the same security constraints used by podman run, then commits the resulting changes for the next build step. section 2.3.1

Install and clean a package

RUN yum -y update; yum -y install procps-ng; yum -y clean all installs the ps command, updates the base image, and removes package-manager cruft from the resulting image. section 2.3.1

How Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more covers it

How deep it goes
Explains build-container execution and committed layers, but gives only one command example rather than detailed syntax variations.
Examples
Uses yum to update packages, install procps-ng, and clean package metadata so the image contains ps with less cruft.
What it assumes
Assumes a base image and basic package-manager commands, while establishing that build commands execute inside a container.
What you can do after
Apply it via Podman to install packages and modify an image while preserving changes for subsequent build steps.
How it connects
Connects Containerfiles to base images, image layers, package management, and CMD.

Also explained in

Compare how 2 books explain run instruction →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more. The section links point to the parts of the book it draws on.