HTTP proxy configuration for Docker on CentOS 7
From Notes_Wiki
<yambe:breadcrumb>Docker|Docker</yambe:breadcrumb>
HTTP proxy configuration for Docker on CentOS 7
On CentOS7 if docker is behind a proxy server then use following steps:
- Create folder for configuring docker service through systemd
- mkdir /etc/systemd/system/docker.service.d
- Create service configuration file at /etc/systemd/system/docker.service.d/http-proxy.conf
- [Service]
- Environment="HTTP_PROXY=http://proxy.iiit.ac.in:8080/" "NO_PROXY=localhost,127.0.0.0/8,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12"
- Reload systemctl so that new settings are read
- sudo systemctl daemon-reload
- Verify that docker service Environment is properly set
- sudo systemctl show docker --property Environment
- Restart docker service so that it uses updated Environment settings
- sudo systemctl restart docker
Learned from https://docs.docker.com/articles/systemd/
<yambe:breadcrumb>Docker|Docker</yambe:breadcrumb>