OS: Red Hat Enterprise Linux 8
Docker CE version: 24.0.6
Docker buildx: v0.11.2
I want to build an existing in-house docker image. I am behind a proxy.
I can pull the python base image via sudo docker pull python:3.11-bullseye
, no problem.
But If I have a Dockerfile which has only FROM python:3.11-bullseye
I get:
[+] Building 0.1s (3/3) FINISHED docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 3.14kB 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 3.73kB 0.0s
=> ERROR [internal] load metadata for docker.io/library/python:3.11-bullseye 0.0s
------
> [internal] load metadata for docker.io/library/python:3.11-bullseye:
------
Dockerfile:7
--------------------
5 |
6 | # Pull base image
7 | >>> FROM python:3.11-bullseye
8 |
9 | # Get arguments from .yml file
--------------------
ERROR: failed to solve: python:3.11-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
My proxy settings:
/etc/systemd/system/docker.service.d/http-proxy.conf:
[Service]
Environment="HTTP_PROXY=http://usr:pwd@proxy.org.ch:8080"
Environment="HTTPS_PROXY=http://usr:pwd@proxy.org.ch:8080"
Environment="NO_PROXY=localhost,127.0.0.1"
/etc/docker/daemon.json
{
"http-proxy": "http://usr:pwd@proxy.org.ch:8080",
"https-proxy": "http://usr:pwd@proxy.org.ch:8080"
}
What is different between pulling from shell and pulling when building and what is likely causing this?