Are you working in restricted corporate environment? Are you looking for how to run Docker behind the firewall.You can always specify an HTTP proxy for docker to use via an environment variable.
First, create a directory for drop-in configuration for docker:
Now, create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the environment variable:
To apply the change, reload the unit and restart docker:
systemctl restart docker