Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build a local Registry

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to build a local Registry, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Although Docker Hub is very convenient, it still has some limitations, such as:

Requires an internet connection, and downloads and uploads are slow.

Images uploaded to Docker Hub can be accessed by anyone, although private repository can be used, but it is not free.

For security reasons, many organizations do not allow images to be placed on the public network.

The solution is to build a local Registry.

Docker has made Registry open source, and there is also an official mirror registry on Docker Hub. Let's run our own registry in Docker.

Start the registry container.

The image we use is registry:2.

-d is the backend launch container.

-p maps port 5000 of the container to port 5000 of Host. 5000 is the registry service port. Port mapping will be discussed in detail in the container network section.

-v maps the container / var/lib/registry directory to the / myregistry of Host, which is used to store mirror data. The use of-v will be discussed in detail in the container storage section.

Rename the mirror through docker tag to match the registry.

You can now download the image from the local registry via docker pull.

Except that the name of the mirror is longer (including registry host and port), it is used in exactly the same way.

On how to build a local Registry to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report