I am building an image for a docker container running on a different architecture. As I don’t have internet access all the time, I usually just pull the image when I have internet and docker uses the local image instead of pulling a new one. After I started to build the image with buildx, this does not seem to work anymore. Is there any way to tell docker to only use the local image? When I have connection, docker seems to check wherever there is a new version available but uses the local (or cached) image as I would expect it without internet connection.
$ docker image ls ros galactic bac817d14f26 5 weeks ago 626MB
$ docker image inspect ros:galactic ... "Architecture": "arm64", "Variant": "v8", "Os": "linux", ...
$ docker buildx build . --platform linux/arm64 WARN No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load [+] Building 0.3s (3/3) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 72B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => ERROR [internal] load metadata for docker.io/library/ros:galactic 0.0s ------ > [internal] load metadata for docker.io/library/ros:galactic: ------ Dockerfile:1 -------------------- 1 | >>> FROM ros:galactic 2 | RUN "echo hello" 3 | -------------------- error: failed to solve: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Fros%3Apull&service=registry.docker.io": proxyconnect tcp: dial tcp 127.0.0.1:3333: connect: connection refused