summaryrefslogtreecommitdiff
path: root/cmd/podman/images
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-01-27 16:49:47 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-01-27 16:49:47 +0100
commit15caebfe561952eaadd4896b7efb56f26724cce5 (patch)
treea0f9abfb073e3628bee609f32a93fcc1f6630f09 /cmd/podman/images
parent2ff4da9b59df27584e436ff59a9d12b2c5e5e410 (diff)
downloadpodman-15caebfe561952eaadd4896b7efb56f26724cce5.tar.gz
podman-15caebfe561952eaadd4896b7efb56f26724cce5.tar.bz2
podman-15caebfe561952eaadd4896b7efb56f26724cce5.zip
podman build --pull: use correct policy
The `--pull` flag should be using the "pull if newer" pull policy rather than "pull always". This aligns with what the help message states, what Buildah does and, according to #9111, what was done before, Also add a test to prevent future regressions. Fixes: #9111 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'cmd/podman/images')
-rw-r--r--cmd/podman/images/build.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index 4219e325b..957c0ac2d 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -266,7 +266,7 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
pullPolicy := imagebuildah.PullIfMissing
if c.Flags().Changed("pull") && flags.Pull {
- pullPolicy = imagebuildah.PullAlways
+ pullPolicy = imagebuildah.PullIfNewer
}
if flags.PullAlways {
pullPolicy = imagebuildah.PullAlways