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
/etc/systemd/system/docker.service.d/docker_http_proxy.conf
[Service]
Environment = "HTTP_PROXY=http://login: password@10.0.2.2: 9128/"
Environment = "HTTPS_PROXY=https://login: password@10.0.2.2: 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: password@10.0.2.2:9128/"
export https_proxy=http://login: password@10.0.2.2:9128/"
and it works
Is there a way to all container use the proxy without configuration inside the container.
Thanks