How to make docker pull image via proxy

Location: In Company.
You need create the files of 10_docer_proxy.conf in /etc/systemd/system/docker.service.d/.

10_docer_proxy.conf of content as below:

[Service]
Environment=”TTP_PROXY=http://127.0.0.1:3128″
Environment=”HTTPS_PROXY=http://127.0.0.1:3128″
Environment=”NO_PROXY=localhost,127.0.0.0/8″

Then  Save and exit.

Restart the docker service.
#systemctl restart docker.service

Make someone user can user docker command without root privilege.
#usermod -aG docker UserName

FB 留言

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *