diff --git a/cmd/podman/common/build.go b/cmd/podman/common/build.go index 2abf62520e8d..2174b3bf8aa0 100644 --- a/cmd/podman/common/build.go +++ b/cmd/podman/common/build.go @@ -75,7 +75,7 @@ func DefineBuildFlags(cmd *cobra.Command, buildOpts *BuildFlagsWrapper, isFarmBu if err := flag.Value.Set("missing"); err != nil { logrus.Errorf("Unable to set --pull to 'missing': %v", err) } - flag.Usage = `Pull image policy ("always/true"|"missing"|"never/false"|"newer")` + flag.Usage = `Pull image policy ("always"|"missing"|"never"|"newer")` flags.AddFlagSet(&budFlags) // Add the completion functions diff --git a/docs/source/markdown/options/pull.image.md b/docs/source/markdown/options/pull.image.md index 0b0a6ccfda55..112e61221089 100644 --- a/docs/source/markdown/options/pull.image.md +++ b/docs/source/markdown/options/pull.image.md @@ -4,9 +4,9 @@ ####> are applicable to all of those. #### **--pull**=*policy* -Pull image policy. The default is **always**. +Pull image policy. The default is **missing**. -- **always**, **true**: Always pull the image and throw an error if the pull fails. +- **always**: Always pull the image and throw an error if the pull fails. - **missing**: Only pull the image when it does not exist in the local containers storage. Throw an error if no image is found and the pull fails. -- **never**, **false**: Never pull the image but use the one from the local containers storage. Throw an error when no image is found. +- **never**: Never pull the image but use the one from the local containers storage. Throw an error when no image is found. - **newer**: Pull if the image on the registry is newer than the one in the local containers storage. An image is considered to be newer when the digests are different. Comparing the time stamps is prone to errors. Pull errors are suppressed if a local image was found. diff --git a/docs/source/markdown/podman-build.1.md.in b/docs/source/markdown/podman-build.1.md.in index 8c0c092b62fa..102c0d02b1f5 100644 --- a/docs/source/markdown/podman-build.1.md.in +++ b/docs/source/markdown/podman-build.1.md.in @@ -313,8 +313,6 @@ the help of emulation provided by packages like `qemu-user-static`. @@option pull.image -Pull image policy. The default is **missing**. - @@option quiet @@option retry diff --git a/test/system/070-build.bats b/test/system/070-build.bats index fa217d1825a7..cef56e7bf1ef 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -1169,4 +1169,9 @@ function teardown() { basic_teardown } +@test "podman build --help defaults" { + run_podman build --help + assert "$output" =~ "--pull.*(default \"missing\")" "pull should default to missing" +} + # vim: filetype=sh