Let’s have a glance at troubleshooting dockers issues.
As a part of our server management services, we use to handle several such Docker-related issues. You can also consult our technical team support for further assistance.
Fixing the error.
One of our client reports where he tries to run the below command to install Docker on the ubuntu server.
sudo docker pull busybox
The following error was displayed on the screen
Pulling repository busybox 2021/03/16 09:37:07 Get https://index.docker.io/v1/repositories/busybox/images: dial tcp: lookup index.docker.io on 127.0.1.1:53: no answer from server
How to resolve the error
In order to resolve this problem, we first create a systemd drop-in directory for the Docker service and then execute the command.
Later, create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:
Note: In case, if you have internal Docker registries then contact without proxying you can specify them via the NO_PROXY environment variable:
Executive the commands to flush the changes.
$ sudo systemctl daemon-reload
Run the command to verify whether the configuration is loaded or not.
$ sudo systemctl show --property Environment docker
Run the following command in order to restart the docker
$ sudo systemctl restart docker
This will fix the error.
In short, follow the methods to resolve the docker errors. Need further assistance to fix any sort of error, get in touch with us with 24/7 technical support.