summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-02 15:34:20 +0100
committerGitHub <noreply@github.com>2020-11-02 15:34:20 +0100
commit8bc0f51e330185bed1be4bcfffd04729b4bc9cd4 (patch)
tree7784bde1934328c78bcbc47ac83fc9ce3ddfc2b5 /cmd/podman
parentc1ffdfbd7883d45f864c74a4a07cf9ff80b4018f (diff)
parent7841aea292e1dc7cc9c28dfb5f4e935116fb4dfe (diff)
downloadpodman-8bc0f51e330185bed1be4bcfffd04729b4bc9cd4.tar.gz
podman-8bc0f51e330185bed1be4bcfffd04729b4bc9cd4.tar.bz2
podman-8bc0f51e330185bed1be4bcfffd04729b4bc9cd4.zip
Merge pull request #8210 from TomSweeneyRedHat/dev/tsweeney/fixpull2
Match build pull functionality with Docker's
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/images/build.go10
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