0

I am trying to build my first Docker Image and am encountering the error below.

For what its worth I also tried to access the urls via curl and got similar results. Not sure what I am missing.

Do I need some type of credentials to pull in the main image?

$ docker build -t springio/gs-spring-boot-docker .
Sending build context to Docker daemon  2.048kB
Step 1/4 : FROM openjdk:8-jdk-alpine
Get "https://registry-1.docker.io/v2/": dial tcp 44.207.51.64:443: connect: connection refused

$ curl https://registry-1.docker.io/v2/
curl: (56) Received HTTP code 403 from proxy after CONNECT
RichardFeynman
  • 478
  • 1
  • 6
  • 16
  • Are you in an environment where there's some sort of proxy compromising the integrity of HTTPS connections? – David Maze Aug 18 '22 at 21:56
  • @DavidMaze, yes I am in a environment that requires a proxy, I have run export http_proxy= and export http_proxy= on the cli before running docker build. I have also added them in the docker config.json file as well. –  RichardFeynman Aug 22 '22 at 13:08

2 Answers2

1

Did you try to reboot docker deamon and try to run build again?

Can you just pull this image?

docker pull openjdk:8-jdk-alpine
BaDos
  • 72
  • 4
  • Have not tried to restart deamon, I am not familiar with how to do that. That pull gets similar results. docker pull openjdk:8-jdk-alpine Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp 44.207.51.64:443: connect: connection refused –  RichardFeynman Aug 18 '22 at 15:49
  • Where do you use Docker? I mean the operating system. – BaDos Aug 18 '22 at 15:55
  • I am trying to build on ubuntu. I just tried shutdown -r now, afterwards I still get the same error. –  RichardFeynman Aug 18 '22 at 16:00
  • Can you try to pull other images? For example: `docker pull ubuntu` If you face the same issue, it can be download rate limit https://docs.docker.com/docker-hub/download-rate-limit/ – BaDos Aug 18 '22 at 19:02
0

This answer solved part of my problem: Can't docker pull - connection refused

After that I also needed to get .docker.io white listed for my proxy.

RichardFeynman
  • 478
  • 1
  • 6
  • 16