apt-get in docker behind corporate proxy

后端 未结 4 892
北恋
北恋 2021-02-14 18:48

I\'m attempting to set up a development environment behind a corporate proxy server with Docker. Try as I might, I cannot get the docker container to talk to the proxy server.

4条回答
  •  [愿得一人]
    2021-02-14 19:11

    A couple of comments, after my own experience:

    • make sure to use an http url for HTTPS_PROXY.
    • use lowercase proxy variables in the Dockerfile itself
    • use both cases proxy variables in the docker profile (in my case, it was in /var/lib/boot2docker/profile)
    • in all instances, set a no_proxy/NO_PROXY variable (to .company,.sock,localhost,127.0.0.1,::1)
    • don't forget to include the credentials in the proxy url if your proxy request authentication.

提交回复
热议问题