1podman-container-runlabel(1)() podman-container-runlabel(1)()
2
3
4
6 podman-container-runlabel - Executes a command as described by a con‐
7 tainer image label
8
9
11 podman container runlabel [options] label image [arg...]
12
13
15 podman container runlabel reads the provided LABEL field in the con‐
16 tainer IMAGE and executes the provided value for the label as a com‐
17 mand. If this field does not exist, podman container runlabel will just
18 exit.
19
20
21 If the container image has a LABEL INSTALL instruction like the follow‐
22 ing:
23
24
25 LABEL INSTALL /usr/bin/podman run -t -i --rm \${OPT1} --privileged -v
26 /:/host --net=host --ipc=host --pid=host -e HOST=/host -e NAME=\${NAME}
27 -e IMAGE=\${IMAGE} -e CONFDIR=/etc/\${NAME} -e LOGDIR=/var/log/\${NAME}
28 -e DATADIR=/var/lib/\${NAME} \${IMAGE} \${OPT2} /bin/install.sh
29 \${OPT3}
30
31
32 podman container runlabel will set the following environment variables
33 for use in the command:
34
35
36 If the container image does not have the desired label, an error mes‐
37 sage will be displayed along with a non-zero return code. If the image
38 is not found in local storage, Podman will attempt to pull it first.
39
40
41 LABEL The label name specified via the command.
42
43
44 IMAGE Image name specified via the command.
45
46
47 SUDO_UID The SUDO_UID environment variable. This is useful with the
48 podman -u option for user space tools. If the environment variable is
49 not available, the value of /proc/self/loginuid is used.
50
51
52 SUDO_GID The SUDO_GID environment variable. This is useful with the
53 podman -u option for user space tools. If the environment variable is
54 not available, the default GID of the value for SUDO_UID is used. If
55 this value is not available, the value of /proc/self/loginuid is used.
56
57
58 Any additional arguments will be appended to the command.
59
60
62 --authfile=path
63 Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/contain‐
64 ers/auth.json, which is set using podman login. If the authorization
65 state is not found there, $HOME/.docker/config.json is checked, which
66 is set using docker login.
67
68
69 Note: You can also override the default path of the authentication file
70 by setting the REGISTRY_AUTH_FILE environment variable. export REG‐
71 ISTRY_AUTH_FILE=path
72
73
74 --display
75 Display the label's value of the image having populated its environment
76 variables. The runlabel command will not execute if --display is spec‐
77 ified.
78
79
80 --cert-dir=path
81 Use certificates at path (*.crt, *.cert, *.key) to connect to the reg‐
82 istry. Please refer to containers-certs.d(5) for details. (This option
83 is not available with the remote Podman client)
84
85
86 --creds=[username[:password]]
87 The [username[:password]] to use to authenticate with the registry if
88 required. If one or both values are not supplied, a command line
89 prompt will appear and the value can be entered. The password is en‐
90 tered without echo.
91
92
93 --help, -h
94 Print usage statement
95
96
97 --name, -n=name
98 Use this name for creating content for the container. NAME will default
99 to the IMAGENAME if it is not specified.
100
101
102 --quiet, -q
103 Suppress output information when pulling images
104
105
106 --replace
107 If a container exists of the default or given name, as needed it will
108 be stopped, deleted and a new container will be created from this im‐
109 age.
110
111
112 --tls-verify
113 Require HTTPS and verify certificates when contacting registries (de‐
114 fault: true). If explicitly set to true, then TLS verification will be
115 used. If set to false, then TLS verification will not be used. If not
116 specified, TLS verification will be used unless the target registry is
117 listed as an insecure registry in registries.conf.
118
119
121 Execute the run label of an image called foobar.
122
123
124 $ sudo podman container runlabel run foobar
125
126
127
128 Execute the install label of an image called foobar with additional ar‐
129 guments.
130
131
132 $ sudo podman container runlabel install foobar apples oranges
133
134
135
136 Display the command that would be executed by runlabel.
137
138
139 $ sudo podman container runlabel --display run foobar
140
141
142
144 podman(1), containers-certs.d(5)
145
146
148 September 2018, Originally compiled by Brent Baude (bbaude at redhat
149 dot com)
150
151
152
153 podman-container-runlabel(1)()