Solve the problem that Docker pulls the image and reports Error response from daemon: error parsing HTTP 408 response body

Solve the problem that Docker pulls the image and reports Error response from daemon: error parsing HTTP 408 response body

Problem Description

Docker reported the following error when pulling the image:

Error response from daemon: error parsing HTTP 408 response body: invalid character ‘<’ looking for beginning of value: “h1>408 Request Time-out\nYour browser didn’t send a complete request in time.\n\n”

insert image description here

Cause analysis and solution::

This error is usually caused by Docker having network connectivity issues while downloading the image. You can try the following solutions:
1. Check whether your network connection is normal. Try pinging a known network address to see if the system can connect to the internet. You can also try to verify using another network connection.
2...Make sure the Docker service is running. You can check the status of the Docker service by running the following command in a terminal: sudo service docker status. If the Docker service is not running, run the following command to start the service: sudo service docker start.
3. If the problem persists, try using other Docker image sources.
3.1. Run the following command in the terminal to change the Docker image source: sudo nano /etc/docker/daemon.json, and add the following content to the file:

{
    
    
  "registry-mirrors": [""http://hub-mirror.c.163.com", "https://registry.docker-cn.com""]
}

You can also try to add other domestic sources

Domestic source address
netease http://hub-mirror.c.163.com
University of Science and Technology of China https://docker.mirrors.ustc.edu.cn
Ali Cloud https://pee6w651.mirror.aliyuncs.com

3.2. Load the configuration file: sudo systemctl daemon-reload
3.3. Restart the docker service:sudo systemctl restart docker

problem solving verification

docker imagesview mirror
insert image description here

Guess you like

Origin blog.csdn.net/weixin_44330367/article/details/130340760