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

Deployment and usage of Harbor

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains the "deployment and use of Harbor", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Harbor deployment and use" bar!

one。 What is Harbor?

First, let's take a look at how the official website introduces this product, which is more authoritative:

The development and operation of Docker container applications cannot be separated from reliable image management. Although Docker officially provides a public image repository, it is also necessary to deploy Registry in our private environment in terms of security and efficiency. Harbor is an enterprise-level Docker Registry management project open source by VMware, which includes functions such as rights management (RBAC), LDAP, log audit, management interface, self-registration, image replication and Chinese support.

two。 Environmental preparation

Ubuntu 18.04.1 LTS

Docker version 19.03.1

Docker-compose version 1.24.1

Docker installation:

Wget-qO- https://get.docker.com/ | sh

Sudo service docker start

Docker-compose installation:

Sudo curl-L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname-s)-$(uname-m)"-o / usr/local/bin/docker-compose

Sudo chmod + x / usr/local/bin/docker-compose

Sudo ln-s / usr/local/bin/docker-compose / usr/bin/docker-compose

three。 Install Harbor

Wget https://storage.googleapis.com/harbor-releases/release-1.8.0/harbor-offline-installer-v1.8.1.tgz

Tar xvf harbor-offline-installer-v1.8.1.tgz

There is a harbor.conf file in the directory, which is the configuration file of Harbor, which can be configured as needed.

Then we start harbor and execute install.sh, which is executed here with sudo permissions, otherwise we will encounter some errors with no permissions. When you see "Harbor has been installed and started successfully", it will be fine.

We can use docker-compose to see the running image.

Then we visit this address, the account number is admin, and the password is the one in the configuration file (maybe you changed it to what you want)

Then we created a project of our own, called xin-test.

Then I want to transfer the local hello-world image to here. If it is private, I need to log in, docker login ip.

Type tag: docker tag hello-world localhost/xin-test/hello-world:latest to the image, and use docker images to view the image

Push to warehouse: docker push localhost/xin-test/hello-world

Then we can see this image in the corresponding directory of the warehouse.

This is the end of the brief introduction, to be continued!

Attached:

Because operating on a Tencent Cloud machine, the ssh connection always prompts "Connection closed by remote host". It may be because the network is not good. This problem is very annoying.

# sudo vi / etc/ssh/sshd_config

Find the following two lines and modify them like this

ClientAliveInterval 30

ClientAliveCountMax 86400

The meaning of these two lines is

1. How often does the client send a heartbeat data to the service

2. If the client does not respond in how many seconds, the server will automatically disconnect.

Restart the sshd service sudo service sshd restart

Thank you for reading, the above is the content of "deployment and use of Harbor". After the study of this article, I believe you have a deeper understanding of the deployment and use of Harbor, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Internet Technology

Wechat

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

12
Report