Cannot download Docker images behind a proxy

0 votes

I have ubuntu 13.10, when I try to pull an image using the following command

sudo docker pull busybox

I’m getting an error

Pulling repository busybox
2014/04/16 09:37:07 Get dial tcp: lookup on no answer from server

I installed docker on my ubuntu 13.10 and when I type in my console:

Docker version:

$ sudo docker version

Client version: 0.10.0
Client API version: 1.10
Go version (client): go1.2.1
Git commit (client): dc9c28f
Server version: 0.10.0
Server API version: 1.10
Git commit (server): dc9c28f
Go version (server): go1.2.1
Last stable version: 0.10.0

I’m behind a proxy server without any authentication.

Acquire::http::proxy "";
Acquire::https::proxy "";
Acquire::ftp::proxy "";
Acquire::socks::proxy "socks://";

Where m I going wrong?

Jul 27, 2018 in Docker by Hannah
• 18,570 points

1 answer to this question.

0 votes

Follow these steps

Step 1- create a systemd drop-in directory for the docker service:

mkdir /etc/systemd/system/docker.service.d

step 2 – create a file called /etc/systemd/system/docker.service.d/http-proxy.conf and add the HTTP_PROXY env variable.


Step 3 – If you have internal Docker registries that you need to contact without proxying you can specify them via the NO_PROXY environment variable:


Step 4 - Flush changes:

$ sudo systemctl daemon-reload

Step 5- Verify that the configuration has been loaded:

$ sudo systemctl show --property Environment docker

Step 6- Restart Docker:

$ sudo systemctl restart docker
answered Jul 27, 2018 by Kalgi
• 52,370 points

Related Questions In Docker

0 votes
2 answers
+1 vote
2 answers
0 votes
1 answer

Delete multiple docker images at a time.

Hi@akhtar, You can create your customize command to ...READ MORE

answered Jul 6, 2020 in Docker by MD
• 95,300 points
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,140 points
0 votes
1 answer

How to create a container and run images in docker?

Look for what all images you have ...READ MORE

answered Feb 23, 2019 in Docker by Kalgi
• 52,370 points
+4 votes
4 answers

How To Access a Service on Host From a Docker Container?

Adding to kalgi's answer, You can also ...READ MORE

answered Oct 16, 2018 in Docker by lina
• 8,220 points

edited Oct 16, 2018 by lina 24,229 views