How to set the Proxy for Docker in Linux
Systemd Docker Service In order to the set the proxy for Docker, you will need to create a configuration file for the Docker service. No configuration files exist by default, so one will have to be created. All Systemd service configuration are stored under /etc/systemd/system. In order to keep things organized, we can create a child directory docker.service.d, rather than creating a file called /etc/systemd/system/docker.service . Within this configuration file, we can set our HTTP and HTTPS proxy. We can also set our NO_PROXY value, too. Creating Proxy Configuration Create a new directory for our Docker service configurations. sudo mkdir -p /etc/systemd/system/docker.service.d 2. Create a file called proxy.conf in our configuration directory. sudo vi /etc/systemd/system/docker.service.d/proxy.conf 3. Add t h e following contents, changing the values to match your environment. [Service] Environment=”HTTP_PROXY=http://myproxy.hostname:8080" Environment=”HTTPS_PROXY=...