Docker & HTTP_PROXY @ centos7

Create directory if it doesn’t exist :

mkdir /etc/systemd/system/docker.service.d/

Create file :

echo '[Service]
Environment="HTTP_PROXY=http://<proxy-host>:<proxy-port>"
' > /etc/systemd/system/docker.service.d/http-proxy.conf
echo '[Service]
Environment="HTTPS_PROXY=https://<proxy-host>:<proxy-port>"
' > /etc/systemd/system/docker.service.d/https-proxy.conf

Reload systemctl & docker daemon :

systemctl daemon-reload
systemctl restart docker

Leave a Reply

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

Bienvenue

Ce blog est un bloc-note de choses et d’autres techniques 🙂

Let’s connect !