Client: Docker Engine - Community Version: 24.0.6


I want to build an existing docker compose project on a new VM. The docker compose project consists of two containers db and web.

I have to go through our corporate proxy.

db gets fetched and built without any problem. But then web fails. web is based on python bullseye. It can not fetch the bullseye image:

[+] Running 10/10
 ✔ db 9 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                             7.5s
   ✔ 661ff4d9561e Pull complete                                                                                                                                                                               1.1s
   ✔ c1d93bf5ce63 Pull complete                                                                                                                                                                               0.7s
   ✔ 9344ea92d0fd Pull complete                                                                                                                                                                               0.7s
   ✔ be45118cb34b Pull complete                                                                                                                                                                               3.4s
   ✔ 614e68220451 Pull complete                                                                                                                                                                               1.1s
   ✔ a907e8a572e0 Pull complete                                                                                                                                                                               1.5s
   ✔ cbbd25672b6d Pull complete                                                                                                                                                                               1.6s
   ✔ a7057bfcf742 Pull complete                                                                                                                                                                               5.5s
   ✔ c6dde99972d3 Pull complete                                                                                                                                                                               2.0s
DEBU[0007] using default config store "/root/.docker/buildx"
[+] Building 0.5s (3/3) FINISHED                                                                                                                                                                    docker:default
 => [web internal] load .dockerignore                                                                                                                                                                         0.0s
 => => transferring context: 3.14kB                                                                                                                                                                           0.0s
 => [web internal] load build definition from Dockerfile                                                                                                                                                      0.0s
 => => transferring dockerfile: 3.57kB                                                                                                                                                                        0.0s
 => ERROR [web internal] load metadata for docker.io/library/python:3.11.0rc2-bullseye                                                                                                                        0.4s
 > [web internal] load metadata for docker.io/library/python:3.11.0rc2-bullseye:
DEBU[0007] using default config store "/root/.docker/buildx"
DEBU[0007] serving grpc connection
DEBU[0007] stopping session                              span="load buildkit capabilities"
DEBU[0007] serving grpc connection
DEBU[0008] stopping session
failed to solve: python:3.11.0rc2-bullseye: failed to authorize: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Fpython%3Apull&service=registry.docker.io": dial tcp connect: connection refused

However, if I pull bullseye via the shell it can fetch it without any problems.

Also, as soon as I have fetched bullseye the rest of the web container builds.

I have set the proxies via:




Also, I think in general the proxy is set correctly, because:

  1. db gets fetched from docker repo normally.
  2. If I fetch bullseye from the command line, web builds without any problem, even though it also has to fetch stuff from outside our corp. net.

EDIT: I did not set proxy via shell envs, because we want to set proxy tool specific.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.