Skip to content
Linux8a edited this page Nov 10, 2022 · 1 revision

Proxy

En el cliente, crear o editar el archivo ```~/.docker/config.json`` .Cambie en el JSON y sustituya el tipo de proxy:

httpsProxy o ftpProxy:

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

Otra forma es hacer estos ajustes.

Cree este fichero /etc/systemd/system/docker.service.d/https-proxy.conf

[Service]
Environment="HTTP_PROXY=http://10.0.0.21:3128/"
Environment="HTTPS_PROXY=https://10.0.0.21:3128/"
Environment="HTTP_PROXY=http://10.0.0.21:3128/" "NO_PROXY=localhost,127.0.0.1"
Environment="HTTPS_PROXY=https://10.0.0.21:3128/" "NO_PROXY=localhost,127.0.0.1,"

Reinicie el servicio

service docker restart o systemctl daemon-reload && systemctl restart docker

Referencia: https://docs.docker.com/network/proxy/

Clone this wiki locally