Home > Operation and Maintenance > Docker > How docker replaces domestic warehouse

How docker replaces domestic warehouse

王林
Release: 2020-05-20 10:14:11
Original
4268 people have browsed it

How docker replaces domestic warehouse

1. Use the following command to change the pull address to the domestic mirror warehouse

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

For example:

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

2. Use --registry-mirror Configuring the Docker daemon

You can configure the Docker daemon to use Docker official image acceleration by default. In this way, you can speed up image pulling through the official image by default without having to specify registry.docker-cn.com every time you pull.

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

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

In order to persist the changes permanently, you can modify the /etc/docker/daemon.json file and add On the registry-mirrors key value.

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

Restart Docker after saving the changes to make the configuration take effect.

Recommended tutorial: docker tutorial

The above is the detailed content of How docker replaces domestic warehouse. 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