Troubleshooting Docker “network is unreachable”

Table of Contents

Docker is a powerful platform for developing, shipping, and running applications in containers. However, users occasionally encounter issues, and one common problem is the “network is unreachable” error when trying to pull Docker images from registries like Docker Hub.

Steps to Troubleshoot and Resolve the Issue:

1. Check Internet Connectivity:

Ensure that your virtual machine has internet connectivity. Run the following command to test:


If there’s no internet connectivity, you need to address this issue first.

2. Firewall Settings:

Check if there are any firewall settings blocking Docker from accessing the internet. Open the necessary ports, especially port 443. You can use the following commands to open ports:

   sudo firewall-cmd --permanent --add-port=443/tcp
   sudo firewall-cmd --reload

3. Proxy Settings:

If you are behind a corporate firewall, configure Docker to use proxy settings. Set the HTTP_PROXY and HTTPS_PROXY environment variables:

   export HTTP_PROXY=http://your_proxy:your_port
   export HTTPS_PROXY=http://your_proxy:your_port

4. DNS Resolution:

Ensure that DNS resolution is working correctly. Check DNS resolution by running:


5. Docker Daemon Restart:

Restart the Docker daemon to apply any changes:

   sudo systemctl restart docker

6. Check Docker Daemon Logs:

Examine Docker daemon logs for additional information:

   journalctl -u docker.service

Look for any error messages or warnings that might indicate the cause of the issue.

7. Docker Hub Status:

Check the status of Docker Hub. Sometimes, issues might be on Docker Hub’s end:

Docker Status

8. Update Docker:

Ensure that you are using an up-to-date version of Docker. Update Docker using the package manager:

   sudo yum update docker

How to Encode URL with cURL

Introduction cURL, short for Client URL, is a powerful command-line tool and library for transferring data with URLs. It supports a wide range of protocols,

Read More »

Top 15 Remote Hiring Platforms

Remote work has become increasingly popular in recent years, and with it, the need for remote hiring platforms. These platforms allow companies to find and

Read More »