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:

  1. Navigate the /etc/systemd/system/docker.service.d path and create the following two files with root access.
    Set the Proxy

    • docker-sysconfig.conf
    • http-proxy.conf
  2. 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
  3. 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"
  4. After placing the files with these parameters, restart the docker with the following command:$ docker restart