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

Detailed code for adding electron to the vue project

1. Add in package.json "main": "el...

Complete steps to configure basic user authentication at the Nginx level

Preface Application scenario: probably the intern...

Add ?v= version number after js or css to prevent browser caching

Copy code The code is as follows: <span style=...

Detailed explanation of the usage of scoped slots in Vue.js slots

Table of contents No slots Vue2.x Slots With slot...

Getting Started Tutorial for Beginners⑧: Easily Create an Article Site

In my last post I talked about how to make a web p...

How to load Flash in HTML (2 implementation methods)

First method : CSS code: Copy code The code is as ...

display:grid in CSS3, an introduction to grid layout

1. Grid layout (grid): It divides the web page in...

Using CSS3 to implement font color gradient

When using Animation.css, I found that the font o...

Implementation of deploying Apollo configuration center using docker in CentOS7

Apollo open source address: https://github.com/ct...

CSS Pick-up Arrows, Catalogs, Icons Implementation Code

1. CSS Miscellaneous Icons There are three ways t...

Solution to the error in compiling LVGL emulator on Linux

Table of contents 1. Error phenomenon 2. Error An...

A brief discussion on the specific use of viewport in mobile terminals

Table of contents 1. Basic Concepts 1.1 Two kinds...

JavaScript - Using slots in Vue: slot

Table of contents Using slots in Vue: slot Scoped...

How to use stored procedures in MySQL to quickly generate 1 million records

Preface When testing, in order to test the projec...

Five delay methods for MySQL time blind injection

Five delay methods for MySQL time blind injection...