mirror of
https://github.com/containers/podman.git
synced 2025-05-26 03:47:53 +08:00

The other direction: fix or clean up elements documented in man pages but which did/do not exist in actual podman: * runlabel: add missing "-n" alias for --name And, remove man page entries for nonexistent options: * podman commit: --iidfile * podman container runlabel: --rootfs, --storage * podman create: --cpu-count There are two problems I don't know how to deal with. Both are related to main_local.go:rootCmd.PersistentFlags() : 1) podman-build.1.md documents --cni-config-dir and --runtime options, but these are not actually options under podman build; they are global options. The documentation in this man page differs from that under podman-build. 2) podman ps implements a binary --namespace option, but this option does not (cannot?) appear in --help because there's a global --namespace string option and Cobra somehow gets confused about this. Do we really intend for global options to be parsed on the right-hand side of subcommands? This strikes me as unintuitive and potentially confusing, although the fact that it has taken me this long to discover it suggests that it's not _that_ confusing. Suggestions welcome. I can file issues for 1/2 above, or simply teach my script to special-case ignore them. Signed-off-by: Ed Santiago <santiago@redhat.com>
112 lines
4.1 KiB
Markdown
112 lines
4.1 KiB
Markdown
% podman-container-runlabel(1)
|
|
|
|
## NAME
|
|
podman-container-runlabel - Executes a command as described by a container image label
|
|
|
|
## SYNOPSIS
|
|
**podman container runlabel** [*options*] *label* *image* [*arg...*]
|
|
|
|
## DESCRIPTION
|
|
**podman container runlabel** reads the provided `LABEL` field in the container
|
|
IMAGE and executes the provided value for the label as a command. If this field does not
|
|
exist, `podman container runlabel` will just exit.
|
|
|
|
If the container image has a LABEL INSTALL instruction like the following:
|
|
|
|
`LABEL INSTALL /usr/bin/podman run -t -i --rm \${OPT1} --privileged -v /:/host --net=host --ipc=host --pid=host -e HOST=/host -e NAME=\${NAME} -e IMAGE=\${IMAGE} -e CONFDIR=\/etc/${NAME} -e LOGDIR=/var/log/\${NAME} -e DATADIR=/var/lib/\${NAME} \${IMAGE} \${OPT2} /bin/install.sh \${OPT3}`
|
|
|
|
`podman container runlabel` will set the following environment variables for use in the command:
|
|
|
|
If the container image does not have the desired label, an error message will be displayed along with a non-zero
|
|
return code. If the image is not found in local storage, Podman will attempt to pull it first.
|
|
|
|
**LABEL**
|
|
The label name specified via the command.
|
|
|
|
**IMAGE**
|
|
Image name specified via the command.
|
|
|
|
**SUDO_UID**
|
|
The `SUDO_UID` environment variable. This is useful with the podman
|
|
`-u` option for user space tools. If the environment variable is
|
|
not available, the value of `/proc/self/loginuid` is used.
|
|
|
|
**SUDO_GID**
|
|
The `SUDO_GID` environment variable. This is useful with the podman
|
|
`-u` option for user space tools. If the environment variable is
|
|
not available, the default GID of the value for `SUDO_UID` is used.
|
|
If this value is not available, the value of `/proc/self/loginuid`
|
|
is used.
|
|
|
|
Any additional arguments will be appended to the command.
|
|
|
|
## OPTIONS:
|
|
**--authfile**=*path*
|
|
|
|
Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.
|
|
If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`. (Not available for remote commands)
|
|
|
|
Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
|
|
environment variable. `export REGISTRY_AUTH_FILE=path`
|
|
|
|
**--display**
|
|
|
|
Display the label's value of the image having populated its environment variables.
|
|
The runlabel command will not execute if --display is specified.
|
|
|
|
**--cert-dir**=*path*
|
|
|
|
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.
|
|
Default certificates directory is _/etc/containers/certs.d_. (Not available for remote commands)
|
|
|
|
**--creds**=*[username[:password]]*
|
|
|
|
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.
|
|
|
|
**--help**, **-h**
|
|
Print usage statement
|
|
|
|
**--name**, **-n**=*name*
|
|
|
|
Use this name for creating content for the container. NAME will default to the IMAGENAME if it is not specified.
|
|
|
|
**--quiet**, **-q**
|
|
|
|
Suppress output information when pulling images
|
|
|
|
**--replace**
|
|
|
|
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.
|
|
|
|
**--tls-verify**
|
|
|
|
Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true,
|
|
then TLS verification will be used. If set to false, then 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 registries.conf (Not available for remote commands)
|
|
|
|
## Examples
|
|
|
|
Execute the run label of an image called foobar.
|
|
```
|
|
$ sudo podman container runlabel run foobar
|
|
```
|
|
|
|
Execute the install label of an image called foobar with additional arguments.
|
|
```
|
|
$ sudo podman container runlabel install foobar apples oranges
|
|
```
|
|
|
|
Display the command that would be executed by runlabel.
|
|
```
|
|
$ sudo podman container runlabel --display run foobar
|
|
```
|
|
|
|
## SEE ALSO
|
|
podman(1)
|
|
|
|
## HISTORY
|
|
September 2018, Originally compiled by Brent Baude (bbaude at redhat dot com)
|