Académique Documents
Professionnel Documents
Culture Documents
20 Answers
That's an old subject, but I'll give my tw o cents in case someone else is looking for advice.
Here is a link to the official docker doc for proxy http: https://docs.docker.com/engine/admin
/systemd/#http-proxy
A quick outline:
mkdir /etc/systemd/system/docker.service.d
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/"
If you have internal Docker registries that you need to contact w ithout proxying you can specify
them via the NO_PROXY environment variable:
Environment="HTTP_PROXY=http://proxy.example.com:80/"
Environment="NO_PROXY=localhost,127.0.0.0/8,docker-registry.somecorporation.com"
Flush changes:
Restart Docker:
2 T his works for Debian Jessie running Docker 1.6.2. Somehow editing /etc/default/docker does
not work. Maybe I should remove export like the one documented for Centos. – neurite Nov 5 '15
at 19:29
2 For me this worked over the selected answer. Ubuntu 15.10 – Kshitiz Sharma Dec 3 '15 at 4:05
16 Works for Ubuntu 16.04 for me. – labyrinth Apr 21 '16 at 21:00
3 For ubuntu 14.04 refer @n3o 's answer, Since systemctl is not available for ubuntu 14.04, it uses
upstart to bring up the services. – chinmay Sep 16 '16 at 12:43
But instead, I suggest you have a look at your /etc/default/docker configuration file : you should
have a line to uncomment (and maybe adjust) to get your proxy settings applied automatically.
Then restart the Docker server:
1 de 1 13/12/2017 10:13