Docker Ubuntu Behind Proxy

后端 未结 7 1497
陌清茗
陌清茗 2021-01-29 19:43

Looking at docs there is no instruction on how to run it behind a proxy. https://docs.docker.com/installation/ubuntulinux/

Reading on forums, the instruction is to updat

7条回答
  •  说谎
    说谎 (楼主)
    2021-01-29 19:52

    systemctl will have to installed, which can be problematic. In case /etc/systemd/system/docker.service.d/http-proxy.conf or /etc/default/docker solution does not work for you, simply use the below command:

    docker build [OPTIONS] PATH --build-arg http_proxy=http://your.proxy:port --build-arg https_proxy=http://your.proxy:port --build-arg no_proxy=.internal.domain,localhost,127.0.0.1

提交回复
热议问题