资讯详情

Docker proxy

mkdir /etc/systemd/system/docker.service.dvim /etc/systemd/system/docker.service.d/http-proxy.conf

[Service]Environment="HTTP_PROXY=http://xx:80/"Environment="HTTPS_PROXY=https://xx:80/"

If you have internal Docker registries that you need to contact without 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:$ sudo systemctl daemon-reload

#Verify that the configuration has been loaded:$ sudo systemctl show --property Environment dockerEnvironment=HTTP_PROXY=http://proxy.example.com:80/

#Restart Docker:$ sudo systemctl restart docker

sudo HTTP_PROXY=http://192.168.1.1:3128/ docker pull busybox

vim /etc/default/docker service docker restart

CentoOs:/etc/sysconfig/docker

Addition:If you're using the new Docker for Mac (or Docker for Windows), just right-click the Docker tray icon and select Preferences (Windows: Settings), then go to Advanced, and under Proxies specify your proxy settings there. Click Apply and Restart and wait until Docker restarts.

标签: 2dvim综合传感器

锐单商城拥有海量元器件数据手册IC替代型号,打造 电子元器件IC百科大全!

 锐单商城 - 一站式电子元器件采购平台  

 深圳锐单电子有限公司