Docker Community Forums

Share and learn in the Docker community.

Docker proxy setup (on the client side)

I have a docker proxy set up (made by using Nexus OSS), and I am having trouble getting the client to pull from the proxy.
I have followed the steps of setting up the environmental variable HTTP_PROXY.
I created a file with the following contents:
sudo vi /etc/systemd/system/docker.service.d/http-proxy.conf

[Service]
Environment="HTTP_PROXY=http://10.1.2.88:80/repository/docker-proxy/"

I entered these commands after:

sudo systemctl daemon-reload
sudo systemctl restart docker

Here is the result of this command, which checks to ensure the environmental variable exists:
systemctl show docker --property Environment

Environment=HTTP_PROXY=http://10.1.2.88:80/repository/docker-proxy/

Whenever I run the command to pull an image, I get the following:
sudo docker pull debian

Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: Not Found

This indicates to me that it is not attempting to go through my proxy. Even if we assume the proxy isn’t working, it should still be attempting to pull through it. Can anyone tell me why this is happening?

I attempted this command as well to test the proxy:
sudo HTTP_PROXY=http://10.1.2.88:80/repository/docker-proxy/ docker pull busybox
But I still got the same output.