docker behind proxy

Если докер находится за прокси, постоянно видим такую ошибку:

[root@mist ~]# cd /tmp/; docker-compose up -d
Pulling traefik (traefik:v1.5)...
ERROR: Get https://registry-1.docker.io/v2/: dial tcp 54.165.149.19:443: connect: connection refused


делаем следующее:

$ mkdir -p /etc/systemd/system/docker.service.d

$ cat < EOF >> /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/" "HTTPS_PROXY=http://proxy.example.com:80/" "NO_PROXY=localhost,127.0.0.1"
EOF
$ systemctl daemon-reload
$ systemctl restart docker
$ systemctl show --property=Environment docker
https://docs.docker.com/config/daemon/systemd/#httphttps-proxy

Comments powered by CComment

Designed by san © 2018