I am newbie for docker. I try set a proxy for debian:jessie image but i didnt make it. I follow this link . I apply all of them with cat tag (example: 'cat > proxy.sh' , because vi or another editor not installed ) but there is some error about my proxy in apt-get update command.
Error Photo
My proxy : http://username:password@proxy2.domain.com
You can set the proxy environment variables when starting the container, for example:
If you want the proxy-server to be automatically used when starting a container, you can configure default proxy-servers in the Docker CLI configuration file (
~/.docker/config.json
). You can find instructions for this in the networking section in the user guide.For example:
To verify if the
~/.docker/config.json
configuration is working, start a container and print itsenv
:you need instruct the apt script to connect through proxy inside the container
remember, this should be written inside the container
and in the machine that have docker running, the proxy should be configured like people said before in their comments