diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-05-29 10:35:22 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-06-11 11:01:13 +0200 |
commit | cf89bb671184e453c4ba5f27e26d02216d8fc491 (patch) | |
tree | ed707e35dcae297a60e97150bc407d9a5ea5ff80 /cmd/podman/common/create.go | |
parent | 7d71d24440afbf30689c53c2c69205072e4b029f (diff) | |
download | podman-cf89bb671184e453c4ba5f27e26d02216d8fc491.tar.gz podman-cf89bb671184e453c4ba5f27e26d02216d8fc491.tar.bz2 podman-cf89bb671184e453c4ba5f27e26d02216d8fc491.zip |
container-{create,run}: add `--pod-id-file`
Allow containers to join an existing pod via the `--pod-id-file` which
is already supported by a number of `podman-pod` subcommands. Also add
tests to make sure it's working and to prevent future regressions.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'cmd/podman/common/create.go')
-rw-r--r-- | cmd/podman/common/create.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index 86cd51643..e79c5c20b 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -338,6 +338,11 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet { "pod", "", "Run container in an existing pod", ) + createFlags.StringVar( + &cf.PodIDFile, + "pod-id-file", "", + "Read the pod ID from the file", + ) createFlags.BoolVar( &cf.Privileged, "privileged", false, |