diff options
author | Qi Wang <qiwan@redhat.com> | 2019-07-22 09:47:42 -0400 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2019-08-09 15:21:34 -0400 |
commit | decfea65bed9e84373c8cdc538f79686c0ad40b9 (patch) | |
tree | fce60eb1ae070ef691432d63970ded2eabf8b67d /cmd/podman/common.go | |
parent | d05798e5e8efcb1acdd8794edfa0f82bf5f01045 (diff) | |
download | podman-decfea65bed9e84373c8cdc538f79686c0ad40b9.tar.gz podman-decfea65bed9e84373c8cdc538f79686c0ad40b9.tar.bz2 podman-decfea65bed9e84373c8cdc538f79686c0ad40b9.zip |
add --pull flag for podman create&run
Requirement from https://github.com/containers/libpod/issues/3575#issuecomment-512238393
Added --pull for podman create and pull to match the newly added flag in docker CLI.
`missing`: default value, podman will pull the image if it does not exist in the local.
`always`: podman will always pull the image.
`never`: podman will never pull the image.
Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'cmd/podman/common.go')
-rw-r--r-- | cmd/podman/common.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go index 1e9092bd6..32478bb51 100644 --- a/cmd/podman/common.go +++ b/cmd/podman/common.go @@ -388,6 +388,10 @@ func getCreateFlags(c *cliconfig.PodmanCommand) { "publish-all", "P", false, "Publish all exposed ports to random ports on the host interface", ) + createFlags.String( + "pull", "missing", + `Pull image before creating ("always"|"missing"|"never") (default "missing")`, + ) createFlags.BoolP( "quiet", "q", false, "Suppress output information when pulling images", |