Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Docker Error response from daemon i\o timeout internet proxy

In this article after installing docker (How to install Docker on Linux) and configuring its service (Cannot connect to the Docker daemon at unix:var run docker.sock. Is the docker daemon running) next step is to download docker containers from docker hub (internet) for testing purpose.

My docker is setup properly and docker engine is running good, as I can see below.

Docker Error response from daemon i/o timeout internet proxy docker version service docker engine community containerd runc docker-init

I will try downloading simple and smallest docker image for testing with below command, (this require Internet connection as images will be downloaded from docker hub).

sudo docker run hello-world

As I don't have direct connection and proxy server is configured in .bashrc file for logged in user, I was receiving below error. 

Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.34.11:53: read udp 192.168.34.13:38062->192.168.34.11:53: i/o timeout.
See 'docker run --help'.

This is due to docker proxy need to be configured separately.

sudo-docker-run-error-response-from-daemon-io-timeout-internet-proxy-configuration-1024x98.png

To configure docker proxy create a new folder /etc/systemd/system/docker.service.d and create a file http-proxy.conf inside it. 

mkdir /etc/systemd/system/docker.service.d
cat > /etc/systemd/system/docker.service.d/http-proxy.conf

Add below proxy information in the file replace <ip> to your proxy ips. (you uyse vi text editor as well)

[Service]
Environment="HTTP_PROXY=<ip>:808"
Environment="HTTPS_PROXY=<ip>:808"
Environment="NO_PROXY=localhost,127.0.0.1,localaddress,.localdomain.com"

Once the file is configured reload docker daemon and restart docker service with systemctl.

sudo systemctl daemon-reload
sudo systemctl restart docker

mkdir-docker.service.d-http-proxy.conf-environment-https_proxy-no_proxy-docker-proxy-configuration-systemctl-daemon-reload-service-restart-docker.png

In the last try with downloading hello-world image container from docker hub (hello-world is smaller image to download), It will be successful with highlighted message as shown below. You can use docker ps -a check the container information.

sudo docker run hello-world

docker-ps-a-processes-container-id-image-docker-run-hello-world-status-exited-docker-successfully-installed-internet-proxy-community-edition-1024x414.png

Useful Article
How to install Ansible on Linux for vSphere configuration
PART 1 : BUILDING AND BUYING GUIDE IDEAS FOR VMWARE LAB
PART 2 : BUILDING AND HARDWARE BUYING GUIDE IDEAS FOR VMWARE LAB
PART 3 : MY VSPHERE LAB CONFIGURATION ON VMWARE WORKSTATION

Go Back

Comment

Blog Search

Page Views

12278834

Follow me on Blogarama