Docker Community Forums

Share and learn in the Docker community.

Docker and proxy enterprise

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

Environment = "HTTP_PROXY=http://login: password@ 9128/"
Environment = "HTTPS_PROXY=https://login: password@ 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@"
export https_proxy=http://login: password@"

and it works
Is there a way to all container use the proxy without configuration inside the container.