Docker Community Forums

Share and learn in the Docker community.

Turn off loading metadata from registry

When I run docker build on a image, the first thing it does is

=> [internal] load metadata for docker.io/x/y

for each of the images that I depend on and haven’t built locally.

I am on a satellite and this takes between 15 seconds and 30 seconds every time… and I’m constantly rebuilding and testing… and I know that nothing has changed.

None of the options on docker build seem to be related to turning this off. I would really like a way to either
(A) Turn this off with docker build --dont-look-at-registry on a per-run basis
(B) Have it cached with a configured TTL, so it won’t check more than once every X minutes/hours/days/etc

Is there a way to do either of these or otherwise work around this?