Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Docker配置HTTP/HTTPS代理 #88

Open
jwenjian opened this issue Aug 12, 2019 · 0 comments
Open

Docker配置HTTP/HTTPS代理 #88

jwenjian opened this issue Aug 12, 2019 · 0 comments

Comments

@jwenjian
Copy link
Owner

jwenjian commented Aug 12, 2019

  1. 创建配置文件目录
sudo mkdir -p /etc/systemd/system/docker.service.d
  1. 在上面的目录下新建配置文件http-proxy.conf, 配置如下内容:
[Service]
Environment="HTTPS_PROXY=http://proxy_server_host:proxy_port/"

其中, proxy_server_host为你的代理服务器IP或者域名, proxy_port为对应的代理端口

  1. 刷新配置
sudo systemctl daemon-reload
  1. 重启docker服务
sudo systemctl restart docker
  1. 验证
systemctl show --property=Environment docker

出现如下信息则表示配置成功: Environment="HTTPS_PROXY=http://proxy_server_host:proxy_port/"

August 12, 2019 at 04:03PM

via Instapaper https://ift.tt/2YWJyqH

@jwenjian jwenjian changed the title [From Instapaper] : Docker配置HTTP/HTTPS代理 Docker配置HTTP/HTTPS代理 Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant