Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How centos7 docker uses https_proxy for proxy configuration

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about how centos7 docker uses https_proxy for proxy configuration. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

Centos7 docker is configured using the https_proxy proxy

In the centos6 version, if you configure the https_proxy agent of docker, you only need to add the configuration in the / etc/sysconfig/docker configuration file, but in centos7 you will find that you can no longer use this configuration method for https_proxy configuration, because centos uses systemd to manage the process environment. We need the following configuration to apply the https_proxy configuration.

Create a directory

Mkdir / etc/systemd/system/docker.service.d

Create a file

Touch / etc/systemd/system/docker.service.d/http-proxy.conf

Configure the http-proxy.conf file to add the following

[Service] Environment= "HTTP_PROXY= http://proxy.ip.com:80"

Daemon re-reload and restart docker

Systemctl daemon-reloadsystemctl restart docker

Check whether the variable is loaded

Systemctl show docker-property Environment above is the centos7 docker shared by Xiaobian how to use https_proxy for proxy configuration. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report