I'm beginner and I having trouble with docker behind company proxy

HI all, i’m beginner and in my company, we have a proxy, when i try to build this Dockerfile

FROM frolvlad/alpine-oraclejdk8:8.131.11-slim
COPY target/PEcoDb-0.0.1-SNAPSHOT.jar app.jar
RUN mvn clean install

and after I launch this command : docker build --build-arg http_proxy=<my_proxy> -t “pecodb:Dockerfile” I receive :

ERROR: failed to solve: frolvlad/alpine-oraclejdk8:8.131.11-slim: failed to do request: Head "https://registry-1.docker.io/v2/frolvlad/alpine-oraclejdk8/manifests/8.131.11-slim": dialing registry-1.docker.io:443 container via direct connection because manual override has no HTTPS proxy: connecting to dial tcp connectex: Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato.

I’ve also changed the config file and the proxie setting inside the docker desktop app, but I’ve checked that docker run with wsl and with this configuration docker cannot take the proxy setting. How can I resolve and how can I force docker to read the proxy settings ? thanks

Maybe you can use https_proxy in addition to http_proxy?
That won’t help since that would be for commands inside the container during the build process and your problem is with downloading the base image from the registry. There is no container yet.

Why not?

You can also read this part of the documentation if you haven’t read it yet



Builds and containers use the configuration specified in this file