Hi everyone, I have some issue with docker behind proxy.
I use docker on VM Debian. My VM debian is configured in nat.
I configured the daemon docker to use a proxy by creating a file
[Service] Environment = "HTTP_PROXY=http://login: firstname.lastname@example.org: 9128/" Environment = "HTTPS_PROXY=https://login: email@example.com: 9128/"
It works because I can run docker run hello-word.
But when I have a docker file with apt-get update it does not work
So I try to run a simply debain container with
docker run -it debian /bin/bash
and when I run apt-get update I have the error 403 forbidden so I add inside the container proxy by this command
export http_proxy=http://login: firstname.lastname@example.org:9128/" export https_proxy=http://login: email@example.com:9128/"
and it works
Is there a way to all container use the proxy without configuration inside the container.