Closed vorburger closed 4 years ago
@vorburger What is the difference. This looks like podman build --pull=false
Does not pull the image even if the image does not exist, does docker build --pull=false
pull the image if it does not exists locally?
@vorburger What is the difference. This looks like
podman build --pull=false
Does not pull the image even if the image does not exist, doesdocker build --pull=false
pull the image if it does not exists locally?
I'm not 100% sure what the exact behaviour of docker build --pull=false
is if the parent FROM
image does not exist (and will admit that I haven't actually tried it out myself), but basically yes, over in https://github.com/kubernetes/kubernetes/issues/79048 your fellow red hat @cblecker said the following (and based on this refused, rightfully, to change --pull=false
to --pull=true
in some K8s scripts, because "it works in docker so it's podman build's problem"), hear:
Looks like it has to do with a difference in flag meanings between docker and podman.
docker build --pull=false
seems to be the equivalent of apodman build --pull-always=false
.podman build --pull=false
has a different meaning and functionality.I would suggest opening up a bug report against libpod.. if they're going to provide an emulation layer, it should probably associate the right flags.
@cblecker perhaps you'd like to chime in here?
@nalind WDYT?
buildah bud
has --pull and --pull-always (buildah bud --pull-always
is the equivalent of docker build --pull
)
The problem is when we vendor this into podman build
, users expect it's --pull to be the same as docker build.
In the podman build
man page, we describe the behaviour:
**--pull**
When the flag is enabled, attempt to pull the latest image from the registries
listed in registries.conf if a local image does not exist or the image is newer
than the one in storage. Raise an error if the image is not in any listed
registry and is not present locally.
If the flag is disabled (with *--pull=false*), do not pull the image from the
registry, use only the local version. Raise an error if the image is not
present locally.
Defaults to *true*.
**--pull-always**
Pull the image from the first registry it is found in as listed in registries.conf.
Raise an error if not found in the registries, even if the image is present locally.
Does the tool currently follow this behaviour?
docker build --pull
is documented as:
--pull=true|false
Always attempt to pull a newer version of the image. The default is
false.
Yup, these are accurate. podman/buildah offer two different, more explicit settings than the docker cli does.. but the issue is when using the podman-docker compatibility/emulation layer, --pull
has a different meaning than the docker CLI.
I think what we should do is eliminate make --pull-always == --pull for Podman and not support --pull at all.
The problem then would be buildah bud --pull
would mean a different thing the podman build --pull
Fixed in Buildah, will be fixed in the next version of Podman after Buildah is vendored.
Fixed with #1959 which has since been vendored into Podman.
Description
It appears that a
docker build --pull=false ...
behaves differently inpodman-docker
than in "real" docker; see https://github.com/kubernetes/kubernetes/issues/79048 for an analysis.Steps to reproduce the issue:
fails on Buildah in Podman saying
Error: error creating build container: no such image "containers-storage:[overlay@/home/vorburger/.local/share/containers/storage+/tmp/1000:overlay.mount_program=/usr/bin/fuse-overlayfs]k8s.gcr.io/kube-cross:v1.12.5-1"
but (apparently) works in regular docker.Output of
podman version
:Output of
podman info --debug
:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: