diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-29 19:06:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 19:06:51 +0100 |
commit | 222d8075ab08265c6dce8cf0f26a60c9afb64705 (patch) | |
tree | 8579a11b83d905732030aaaecb3cf4980eaf4d3c /cmd | |
parent | c8f0e1dab602ed94af95dc4f604f161696f249e0 (diff) | |
parent | 852f2cbe858a8880c356869c622b49ee362c5307 (diff) | |
download | podman-222d8075ab08265c6dce8cf0f26a60c9afb64705.tar.gz podman-222d8075ab08265c6dce8cf0f26a60c9afb64705.tar.bz2 podman-222d8075ab08265c6dce8cf0f26a60c9afb64705.zip |
Merge pull request #8085 from TomSweeneyRedHat/dev/tsweeney/fixpulls
Fix pull method selection
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/images/build.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 18c31313b..c53798589 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -240,14 +240,18 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil } } - pullPolicy := imagebuildah.PullNever - if flags.Pull { + pullPolicy := imagebuildah.PullIfNewer + if c.Flags().Changed("pull") && !flags.Pull { pullPolicy = imagebuildah.PullIfMissing } if flags.PullAlways { pullPolicy = imagebuildah.PullAlways } + if flags.PullNever { + pullPolicy = imagebuildah.PullNever + } + args := make(map[string]string) if c.Flag("build-arg").Changed { for _, arg := range flags.BuildArg { |