Difference between revisions of "HTTP proxy configuration for Docker on CentOS 7"

From Notes_Wiki
m
m
 
Line 1: Line 1:
<yambe:breadcrumb self="HTTP proxy configuration for Docker on CentOS 7">CentOS 7.x Docker|CentOS 7.x Docker</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x virtualization|Virtualization]] > [[CentOS 7.x Docker|Docker]] ? [[HTTP proxy configuration for Docker on CentOS 7]]
=HTTP proxy configuration for Docker on CentOS 7=


On CentOS7 if docker is behind a proxy server then use following steps:
On CentOS7 if docker is behind a proxy server then use following steps:
Line 28: Line 27:




<yambe:breadcrumb self="HTTP proxy configuration for Docker on CentOS 7">CentOS 7.x Docker|CentOS 7.x Docker</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x virtualization|Virtualization]] > [[CentOS 7.x Docker|Docker]] ? [[HTTP proxy configuration for Docker on CentOS 7]]

Latest revision as of 08:55, 25 August 2022

Home > CentOS > CentOS 7.x > Virtualization > Docker ? HTTP proxy configuration for Docker on CentOS 7

On CentOS7 if docker is behind a proxy server then use following steps:

  1. Create folder for configuring docker service through systemd
    mkdir /etc/systemd/system/docker.service.d
  2. Create service configuration file at /etc/systemd/system/docker.service.d/http-proxy.conf
    [Service]
    Environment="HTTP_PROXY=http://proxy.iiit.ac.in:8080/" "NO_PROXY=localhost,127.0.0.0/8,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12"
  3. Reload systemctl so that new settings are read
    sudo systemctl daemon-reload
  4. Verify that docker service Environment is properly set
    sudo systemctl show docker --property Environment
  5. Restart docker service so that it uses updated Environment settings
    sudo systemctl restart docker

Learned from https://docs.docker.com/articles/systemd/


Home > CentOS > CentOS 7.x > Virtualization > Docker ? HTTP proxy configuration for Docker on CentOS 7