diff options
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/images/build.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 0ff482cd9..f48d1cd94 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -240,13 +240,9 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil } } - pullPolicy := imagebuildah.PullIfNewer - if c.Flags().Changed("pull") { - if flags.Pull { - pullPolicy = imagebuildah.PullAlways - } else { - pullPolicy = imagebuildah.PullNever - } + pullPolicy := imagebuildah.PullIfMissing + if c.Flags().Changed("pull") && flags.Pull { + pullPolicy = imagebuildah.PullAlways } if flags.PullAlways { pullPolicy = imagebuildah.PullAlways |