Hello
I’ve got a question.
I run docker build
on a Dockerfile with a curl base image:
FROM curlimages/curl:7.87.0
…
I thought that docker build
would effectively perform something like docker pull curlimages/curl:7.87.0
when executing the FROM
command.
But it doesn’t. If I run docker image ls
afterwards it doesn’t outline curimages/curl:7.87.0
. Adding the --pull option (docker build --pull
) doesn’t make a difference.
This is unexpected for me. I would like to get a deeper understanding of docker build
and why I doesn’t simply pull the requested curl image.
Background: we are struggling with docker pull rate limits and want to make use of a pull-through-cache as described here
to work around the limits.
We observe that e.g.docker pull curlimages/curl:7.87.0
leaves behind that curl image in the cache registry, as expected.
But docker build
doesn’t. So whenever we execute some docker build
we run into rate limit issues (sometimes not if our pull limit has refreshed).
I am working on a Windows 10 Enterprise (21H2) workstation with docker 20.10.22.
The registry that works as pull-through-cache is running on some Linux backend system.
Thanks in advance