docker配置代理的用户名密码

  公司访问外网全部需要经过代理服务器,在使用docker的过程中,发现就算为docker配置了代理,还是会因为没有代理服务器认证,导致pull操作失败,报如下错误:

  Error response from daemon: Get https://registry-1.docker.io/v2/: Proxy Authentication Required.

  在官网或者墙内网上找方法,都只讲到配置代理这一步,并没有讲到如果代理服务器需要认证怎么办。于是乎科学上网,google it,最后找到了配置的方法,在配置代理的时候使用如下格式,直接指定用户名密码:

  http(s)://username:password@ip:port

  试了一下,这种方法对linux和docker for windows都管用。

猜你喜欢

转载自www.cnblogs.com/jhwy/p/9847987.html