apt-get in docker behind corporate proxy

后端 未结 4 879
北恋
北恋 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 18:53

    Adding to the above solution, we can also do the below things inside a container to get install with apt-get

    In VM, after installing docker when running images in the container by using behind proxy settings

    docker run -it ubuntu:14.04

    apt-get install wget

    This command will unable to pull packages from apt-get, to do this use the command below

    docker run -it --net=host ubuntu:14.04

    export http_proxy="proxy:port"

    apt-get install wget

提交回复
热议问题