Docker 设置proxy
来源:互联网 发布:混元一气太乙金仙 知乎 编辑:程序博客网 时间:2024/06/07 02:45
不同的版本应对的处理方法不一样.
Ubuntu 14.04 LTS
For Ubuntu 14.04 LTS
who uses SysVinit
, you should modify /etc/default/docker
file:
# cat /etc/default/docker# Docker Upstart and SysVinit configuration file## THIS FILE DOES NOT APPLY TO SYSTEMD## Please see the documentation for "systemd drop-ins":# https://docs.docker.com/engine/articles/systemd/#.......# If you need Docker to use an HTTP proxy, it can also be specified here.export http_proxy="http://web-proxy.corp.xxxxxx.com:8080/"export https_proxy="https://web-proxy.corp.xxxxxx.com:8080/"......
Then restart docker
:
service docker restart
============================================
Ubuntu 16.04 LTS
For Ubuntu 16.04 LTS
who uses Systemd
, you can follow this post:
(1) Create a systemd drop-in directory:
mkdir /etc/systemd/system/docker.service.d
(2) Add proxy in /etc/systemd/system/docker.service.d/http-proxy.conf
file:
# cat /etc/systemd/system/docker.service.d/http-proxy.conf[Service]Environment="HTTP_PROXY=https://username:password@web-proxy.corp.xxxxxx.com:8080/"Environment="HTTPS_PROXY=https://username:password@web-proxy.corp.xxxxxx.com:8080/"Environment="NO_PROXY=localhost,127.0.0.1,localaddress,.localdomain.com"
(3) Flush changes:
systemctl daemon-reload
(4) Restart Docker:
systemctl restart docker
阅读全文
0 0
- Docker:设置代理proxy
- Docker:设置代理proxy
- Docker 设置proxy
- docker http proxy
- docker avec proxy
- docker配置proxy
- [docker]透过proxy进行docker pull
- Docker proxy setting ubuntu 14.04
- docker nginx jwilder/nginx-proxy
- yum的proxy设置
- PROXY.PAC 设置
- 设置Proxy访问网络
- nodejs request设置proxy
- ASIHTTPRequest 设置Proxy(代理)
- Django如何设置proxy
- python设置proxy
- nodejs 设置proxy
- node-gyp 设置 Proxy
- SVN不同版本库迁移
- C++多态与继承
- 赌你半天都想不出的Bug
- 从无到有,关于RxJava的详解
- Python之文件读写
- Docker 设置proxy
- 如何破解TeamView
- MVC视图之【分部视图】【布局页】初了解
- Adding React to an Existing Application
- Android平台Camera实时滤镜实现方法探讨(五)--GLSurfaceView实现Camera预览
- 【docker基础知识】编译Docker源码
- PHP base64转换成图片
- SVN跨版本库迁移目录并保留提交日志
- scrollView 嵌套recyclerView 滑动粘合解决