Solution to the problem of slow docker pull image speed

Solution to the problem of slow docker pull image speed

Currently, Docker has an official mirror for China. For details, please visit https://www.docker-cn.com/registry-mirror

When in use, Docker China's official image acceleration can be accessed through registry.docker-cn.com. This image library only contains popular public images. Private images still need to be pulled from the US image library.

You can use the following command to pull directly from the image acceleration address:

$ docker pull registry.docker-cn.com/myname/myrepo:mytag

For example:

$ docker pull registry.docker-cn.com/library/ubuntu:16.04

Note: Unless you have modified the `--registry-mirror` parameter to the Docker daemon (see below), you will need to specify the full name of the official image. For example, library/ubuntu, library/redis, library/nginx.

Configure the Docker daemon with --registry-mirror

You can configure the Docker daemon to use the Docker official image acceleration by default. This way you can accelerate image pulling through official images by default without having to specify registry.docker-cn.com every time you pull.

You can pass the --registry-mirror parameter when starting the Docker daemon:

$ docker --registry-mirror=https://registry.docker-cn.com daemon

To make the changes permanent, you can modify the /etc/docker/daemon.json file and add the registry-mirrors key.

{
 "registry-mirrors": ["https://registry.docker-cn.com"]
}

After saving the changes, restart Docker for the configuration to take effect.

service docker restart

Note: You can also set this up using Docker for Mac and Docker for Windows.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of where the image pulled by docker is stored
  • Docker pull image and tag operation pull | tag
  • Docker configuration Alibaba Cloud image acceleration pull implementation
  • Detailed explanation of where the images pulled by docker are stored
  • How to solve the problem of slow docker pull image speed
  • Detailed explanation of where the image files pulled by docker are stored
  • Solve the problem of docker pull image error

<<:  Learn MySQL in a simple way

>>:  In-depth understanding of Vue dynamic components and asynchronous components

Recommend

Solution to IDEA not being able to connect to MySQL port number occupation

I can log in to MYSQL normally under the command ...

5 ways to migrate from MySQL to ClickHouse

Data migration needs to be imported from MySQL to...

JavaScript implements a box that follows the mouse movement

This article shares the specific code of JavaScri...

Complete steps to implement face recognition login in Ubuntu

1. Install Howdy: howdy project address sudo add-...

How to use Nginx proxy to surf the Internet

I usually use nginx as a reverse proxy for tomcat...

Introduction to the use of select optgroup tag in html

Occasionally, I need to group select contents. In ...

Better looking CSS custom styles (title h1 h2 h3)

Rendering Commonly used styles in Blog Garden /*T...

Detailed explanation of process management in Linux system

Table of contents 1. The concept of process and t...

CSS3 achieves cool sliced ​​image carousel effect

Today we will learn how to use CSS to create a co...

Tips for viewing History records and adding timestamps in Linux

Tips for viewing History records and adding times...

Detailed tutorial on building an ETCD cluster for Docker microservices

Table of contents Features of etcd There are thre...

Detailed explanation of vue simple notepad development

This article example shares the specific code of ...