Docker Ubuntu Behind Proxy

后端 未结 7 1479
陌清茗
陌清茗 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 20:13

    You can try to add lines in /etc/environment:

    https_proxy="http://127.0.0.1:3128"
    http_proxy="http://127.0.0.1:3128"
    ftp_proxy="http://127.0.0.1:3128"
    no_proxy="127.0.0.1/8, localhost, 192.168.0.0/16"
    

    it will be useful for all services on your Linux system

    Then edit /lib/systemd/system/docker.service. In the end of the [Service] section, add line:

    EnvironmentFile=/etc/environment
    

    And then:

    sudo systemctl daemon-reload
    sudo systemctl restart docker.service
    
    0 讨论(0)
提交回复
热议问题