Docker代理

代码示例

0
0

docker代理

{
 "proxies":
 {
   "default":
   {
     "httpProxy": "http://127.0.0.1:3001",
     "httpsProxy": "http://127.0.0.1:3001",
     "noProxy": "*.test.example.com,.example2.com,127.0.0.0/8"
   }
 }
}
0
0

在代理后面使用docker

# Create a drop-in
mkdir /etc/systemd/system/docker.service.d

# Put this in there (only up until the ##):

[Service]
Environment="HTTP_PROXY=http://user01:[email protected]:8080/"
Environment="HTTPS_PROXY=https://user01:[email protected]:8080/"
Environment="NO_PROXY= hostname.example.com,172.10.10.10"

##

# Then run these commands to reload the systemd daemon and restart docker
systemctl daemon-reload
systemctl restart docker

类似页面

带有示例的类似页面

其他语言

此页面有其他语言版本

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................