summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-29 21:31:20 +0100
committerGitHub <noreply@github.com>2020-10-29 21:31:20 +0100
commit1ce5ece66f567d3a3e52f9a9b5945222eda2d6a2 (patch)
tree90cd33c8b90198b880929e1cd329128f14ae9082 /cmd
parentc08e82aa2578270271e23ce6e4fa22509744cc96 (diff)
parent5180ec985d1ed76174565437dc9c8001781bda28 (diff)
downloadpodman-1ce5ece66f567d3a3e52f9a9b5945222eda2d6a2.tar.gz
podman-1ce5ece66f567d3a3e52f9a9b5945222eda2d6a2.tar.bz2
podman-1ce5ece66f567d3a3e52f9a9b5945222eda2d6a2.zip
Merge pull request #8189 from mheon/further_fix_pull_flag
Fix the `--pull` flag to `podman build` to match Docker
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/images/build.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index c53798589..0ff482cd9 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -241,8 +241,12 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
}
pullPolicy := imagebuildah.PullIfNewer
- if c.Flags().Changed("pull") && !flags.Pull {
- pullPolicy = imagebuildah.PullIfMissing
+ if c.Flags().Changed("pull") {
+ if flags.Pull {
+ pullPolicy = imagebuildah.PullAlways
+ } else {
+ pullPolicy = imagebuildah.PullNever
+ }
}
if flags.PullAlways {
pullPolicy = imagebuildah.PullAlways