Quantcast
Channel: Active questions tagged dockerfile - DevOps Stack Exchange
Viewing all articles
Browse latest Browse all 136

Base image can not be fetched within Dockerfile build but can be fetched from shell

$
0
0

Client: Docker Engine - CommunityVersion: 24.0.6

OS: RHEL8

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.0sDEBU[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 connectionDEBU[0007] stopping session                              span="load buildkit capabilities"DEBU[0007] serving grpc connectionDEBU[0008] stopping sessionfailed 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 3.219.239.5:443: 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:

/etc/systemd/system/docker.service.d/http-proxy.conf

and

/root/.docker/config.json

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.


Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>