.nh .TH podman-container-runlabel 1 .SH NAME .PP podman-container-runlabel - Executes a command as described by a container-image label .SH SYNOPSIS .PP \fBpodman container runlabel\fP [\fIoptions\fP] \fIlabel\fP \fIimage\fP [\fIarg...\fP] .SH DESCRIPTION .PP \fBpodman container runlabel\fP reads the specified \fB\fClabel\fR of the \fB\fCimage\fR and executes it as command on the host. If the label does not exist, Podman will exit with an error. Additional arguments will be appended to the command. .PP Historically, container images describe the contents (e.g., layers) and how a container runtime (e.g., crun(1) or runc(1)) should execute the container. For instance, an image may set the environment and the command in its configuration. However, a container image cannot directly specify how a container engine such as Podman should execute it. For instance, an image configuration does not include information about log drivers, namespaces or which capabilities it needs to run correctly. .PP \fB\fCpodman container runlabel\fR addresses the limitation of container images in a simple yet efficient way. Podman will read the contents of the label and interpret it as a command that will be executed on the host. This way an image can describe exactly how it should be executed by Podman. For instance, a label with the content \fB\fC/usr/bin/podman run -d --pid=host --privileged \\${IMAGE}\fR instructs the image to be executed in a detached, privileged container that is using the PID namespace of the host. This lifts the self-description of a container image from "what" to "how". .PP Please note that the \fB\fCrunlabel\fR command is intended to be run in trusted environments exclusively. Using the command on untrusted images is not recommended. .SH VARIABLES .PP The contents of a label may refer to the following variables which will be substituted while processing the label. .PP \fBIMAGE\fP The name of the image. When executing \fB\fCpodman container runlabel label fedora\fR the \fB\fCIMAGE\fR variable will be replaced with \fB\fCfedora\fR\&. Valid formats are \fB\fCIMAGE\fR, \fB\fC$IMAGE\fR, \fB\fC${IMAGE}\fR and \fB\fC=IMAGE\fR\&. .PP \fBNAME\fP As specified by the \fB\fC--name\fR option. The format is identical to the one of the IMAGE attribute. .PP \fBPWD\fP Will be replaced with the current working directory. .SH OPTIONS .SS \fB--authfile\fP=\fIpath\fP .PP Path of the authentication file. Default is \fB\fC${XDG_RUNTIME_DIR}/containers/auth.json\fR, which is set using \fBpodman login\fP\&. If the authorization state is not found there, \fB\fC$HOME/.docker/config.json\fR is checked, which is set using \fBdocker login\fP\&. .PP Note: There is also the option to override the default path of the authentication file by setting the \fB\fCREGISTRY_AUTH_FILE\fR environment variable. This can be done with \fBexport REGISTRY_AUTH_FILE=\fIpath\fP\fP\&. .SS \fB--cert-dir\fP=\fIpath\fP .PP Use certificates at \fIpath\fP (*\&.crt, *\&.cert, *\&.key) to connect to the registry. (Default: /etc/containers/certs.d) Please refer to \fBcontainers-certs.d(5)\fP for details. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) .SS \fB--creds\fP=\fI[username[:password]]\fP .PP The [username[:password]] to use to authenticate with the registry, if required. If one or both values are not supplied, a command line prompt will appear and the value can be entered. The password is entered without echo. .SS \fB--display\fP .PP Display the label's value of the image having populated its environment variables. The runlabel command will not execute if --display is specified. .SS \fB--help\fP, \fB-h\fP .PP Print usage statement .SS \fB--name\fP, \fB-n\fP=\fIname\fP .PP Use this name for creating content for the container. If not specified, name defaults to the name of the image. .SS \fB--quiet\fP, \fB-q\fP .PP Suppress output information when pulling images .SS \fB--replace\fP .PP If a container exists of the default or given name, as needed it will be stopped, deleted and a new container will be created from this image. .SS \fB--tls-verify\fP .PP Require HTTPS and verify certificates when contacting registries (default: \fBtrue\fP). If explicitly set to \fBtrue\fP, TLS verification will be used. If set to \fBfalse\fP, TLS verification will not be used. If not specified, TLS verification will be used unless the target registry is listed as an insecure registry in \fBcontainers-registries.conf(5)\fP .SH EXAMPLES .PP Execute the \fB\fCrun\fR label of an image called foobar. .PP .RS .nf $ podman container runlabel run foobar .fi .RE .PP Execute the \fB\fCinstall\fR label of an image called foobar with additional arguments. .PP .RS .nf $ podman container runlabel install foobar apples oranges .fi .RE .PP Display the contents of the \fB\fCrun\fR label of image foobar. .PP .RS .nf $ podman container runlabel --display run foobar .fi .RE .SH SEE ALSO .PP \fBpodman(1)\fP, \fBcrun(1)\fP, \fBrunc(8)\fP, \fBcontainers-certs.d(5)\fP, \fBcontainers-auth.json(5)\fP, \fBcontainers-registries.conf(5)\fP .SH HISTORY .PP August 2021, Refinements by Valentin Rothberg (rothberg at redhat dot com) .PP September 2018, Originally compiled by Brent Baude (bbaude at redhat dot com)