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

From Notes_Wiki
(Created page with "<yambe:breadcrumb>Docker|Docker</yambe:breadcrumb> =HTTP proxy configuration for Docker on CentOS 7= On CentOS7 if docker is behind a proxy server then use following steps: #...")
 
m
Line 1: Line 1:
<yambe:breadcrumb>Docker|Docker</yambe:breadcrumb>
<yambe:breadcrumb self="HTTP proxy configuration for Docker on CentOS 7">CentOS 7.x Docker|CentOS 7.x Docker</yambe:breadcrumb>
=HTTP proxy configuration for Docker on CentOS 7=
=HTTP proxy configuration for Docker on CentOS 7=


Line 28: Line 28:




<yambe:breadcrumb>Docker|Docker</yambe:breadcrumb>
<yambe:breadcrumb self="HTTP proxy configuration for Docker on CentOS 7">CentOS 7.x Docker|CentOS 7.x Docker</yambe:breadcrumb>

Revision as of 04:39, 18 September 2018

<yambe:breadcrumb self="HTTP proxy configuration for Docker on CentOS 7">CentOS 7.x Docker|CentOS 7.x Docker</yambe:breadcrumb>

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/


<yambe:breadcrumb self="HTTP proxy configuration for Docker on CentOS 7">CentOS 7.x Docker|CentOS 7.x Docker</yambe:breadcrumb>