Closed srcshelton closed 8 months ago
N.B. This can be worked-around with:
FROM docker.io/gentoo/stage3@sha256:cd31a571b4ac0af92cee68611210df035b327caa1ae7f5cb242f893304b21f25 AS stage3
… but surely the options above should also work?
Change --pull=false to --pull=never
Change --pull=false to --pull=never
It looks as if there's a fix PR posted, but I'll quickly note the following:
# podman build --help | grep pull
--pull string[="true"] Pull image policy ("always/true"|"missing"|"never/false"|"newer") (default "missing")
The other thing, and I'm not sure how much this project is concerned by this, is that the default Docker behaviour seems to be not to overwrite an existing tag if it exists.
N.B. My testing made it look as if this is only an issue when --platform
is used, which doesn't appear to relate to the PR raised… have all occurrences related to this issue been addressed by https://github.com/containers/buildah/pull/5354, or are there more to come?
Issue Description
When running
podman build
on a Containerfile, even withpull=never
a tagged image is replaced with its upstream version.Regardless of the
--pull
directive, Docker uses the existing tagged image - which is the behaviour I'd expect frompodman
.N.B. This only happens when a
--platform
argument is supplied - if not, the behaviour is as expected.Steps to reproduce the issue
Steps to reproduce the issue
N.B.
de2f56d15f71
has becomeee43876c4a27
- it shouldn't have changed!Again with more minimal arguments to
podman build
:… vs:
Describe the results you received
With
--platform
, the tagged image is always replaced with the upstream version even if--pull=never
is supplied.Describe the results you expected
Without
--platform
, the behaviour is as anticipated and matches Docker behaviour (which doesn't vary depending on--platform
).podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
Yes
Additional environment details
Bare-metal host
Additional information
No response