Home  >  Article  >  Operation and Maintenance  >  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
WJOriginal
2020-06-09 16:30:585876browse

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 libraryhttps://www.aliyun.com/product/kubernetes?spm= 5176.10695662.1362911.1.3cab795d6uoX0P

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 <<-'EOF'
{
  "registry-mirrors": ["https://xxxxx.xxxxx.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload    #重启加速器
sudo systemctl restart docker   #重启docker

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!

Statement:
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