techboard.io

Use docker behind an enterprise proxy

2 years ago, Written by , Posted in Unix

Create docker machine with correct proxy settings

The use of docker behind a corporate proxy may be a little difficult. Here are a few tips and tricks to do after a fresh install of docker-toolbox.
First, you must remove the default image if you already have one

docker-machine rm default

Create a new “docker-machine” with proxy settings

docker-machine create -d virtualbox \
--engine-env HTTP_PROXY=http://login:password@example.com:8080 \
--engine-env HTTPS_PROXY=https://login:password@example.com:8080 \
--engine-env NO_PROXY=[exceptions de réseaux interne] \
default

Once this is done, you can check with a simple command docker (run or pull) if you manage to correctly download images from docker hub.

Set GLOBAL ENVS

If you set global envs HTTP_PROXY, HTTP_PROXY, kitematic should work, but do not forget to put your docker machines in exception for the proxy. Here is a small script provided by  kitematic’s github community.

https://github.com/docker/kitematic/wiki/Common-Proxy-Issues-&-Fixes

Enjoy now your docker behind your proxy 😉

 

Latest posts by Jerome Wax (see all)

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *