Docker Community Forums

Share and learn in the Docker community.

Docker compose failed to pull image behind corporate proxy when buildkit is enabled

Hello,

After updating docker desktop to version 3.2.2, docker-compose up starts failing to pull image from docker io.
I’m using docker behind corporate proxy. Proxy is configured in Recources → proxies and was working fine so far.

After some trubleshooting I know that:

  1. pulling images from other repositories works fine
  2. setting buildkit to false in docker engine configuration solve the issue.
  3. setting https_proxy using SetEnvironmentVariable or configuring it globaly solve the issue

Error message from docker-compose

failed to get console mode for stdout: The handle is invalid.
[+] Building 16.9s (2/3)
=> [internal] load build definition from Dockerfile 0.1s
[+] Building 16.9s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.1sailed to authorize: rpc error: code = Unknown desc = failed to fetch anonymous token: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fmaven%3Apull&service=registry.docker.io: di
=> => transferring context: 2B 0.0sarget machine actively refused it.
=> ERROR [internal] load metadata for docker. io/library/maven:3.6.3-ope 16.6s


[internal] load metadata for docker.io/library/maven:3.6.3-openjdk-11-slim:


ERROR: Service ‘service-mock’ failed to build