2.4.3.3 Set the Proxy
This topic provides detailed steps on how to set the proxy.
Perform the following steps to set the Proxy:
- Navigate the /etc/systemd/system/docker.service.d path and create the
following two files with root access.
- docker-sysconfig.conf
- http-proxy.conf
- In the docker-sysconfig.conf File, provide the following
parameters:
[Service]ExecStart=MountFlags=sharedEnvironmentFile=-/etc/sysconfig/dockerEnvironmentFile=-/etc/sysconfig/docker-storageEnvironmentFile=-/etc/sysconfig/docker-networkExecStart=/usr/bin/dockerd \ -g /scratch/docker \ $OPTIONS \ $DOCKER_STORAGE_OPTIONS \ $DOCKER_NETWORK_OPTIONS \ $INSECURE_REGISTRY
- In the http-proxy.conf File, provide the following
parameters:
[Service]Environment="HTTP_PROXY=http://www-proxy.idc.oracle.com:80/" "NO_PROXY=localhost,127.0.0.1,.us.oracle.com,.oraclecorp.com" Environment="HTTPS_PROXY=http://www-proxy.idc.oracle.com:80/" "NO_PROXY=localhost,127.0.0.1,.us.oracle.com,.oraclecorp.com"
- After placing the files with these parameters, restart the docker with the
following command:
$ docker restart