Home > Operation and Maintenance > Docker > How to solve the problem of failure to pull the image in docker

How to solve the problem of failure to pull the image in docker

WJ
Release: 2020-06-09 16:30:58
Original
6072 people have browsed it

Solution:

How to solve the problem of failure to pull the image in docker

How to solve the problem of failure to pull the image in docker?

Using Alibaba Cloud Accelerator

1. First enter Alibaba Cloud’s docker library<a href="https://www.aliyun.com/product/kubernetes?spm=5176.10695662.1362911.1.3cab795d6uoX0P" _src="https://www.aliyun.com/product/kubernetes?spm=5176.10695662.1362911.1.3cab795d6uoX0P">https://www.aliyun.com/product/kubernetes?spm= 5176.10695662.1362911.1.3cab795d6uoX0P</a>

2. Register an account and enter the console management;

3. Select the image accelerator option;

How to solve the problem of failure to pull the image in docker

4. Enter the mirror accelerator option and you can see your accelerator address. You can modify it according to the modification steps prompted to accelerate

How to solve the problem of failure to pull the image in docker

##5. First modify the file "

/etc/docker/daemon.json" (If there is no such file, you can manually create an empty file)

sudo mkdir -p /etc/docker   #创建目录
#在指定目录下添加如下文件内容
sudo tee /etc/docker/daemon.json <<-&#39;EOF&#39;
{
  "registry-mirrors": ["https://xxxxx.xxxxx.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload    #重启加速器
sudo systemctl restart docker   #重启docker
Copy after login

How to solve the problem of failure to pull the image in docker##6. Re- Pull the image and test the accelerator effect

How to solve the problem of failure to pull the image in dockerThe image was successfully pulled

Note: The above accelerator is the Alibaba Cloud accelerator, you can also choose other suitable ones Accelerator usage

Related recommendations:

docker tutorial

The above is the detailed content of How to solve the problem of failure to pull the image in docker. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template