A concise guide to using image warehouse

Time:2021-5-4

1、 Use administrator to assign users

Use the administrator to log in to the harbor console, enter “system management” – user management, and click create user:
A concise guide to using image warehouse

Fill in the create user form, that is, assign a user account:
A concise guide to using image warehouse

2、 New project

Log in to the harbor console with the testuser created just now, and click “new project” on the right
A concise guide to using image warehouse

Fill in the project name, and set whether the project image warehouse supports public access (here it is set as public access)
A concise guide to using image warehouse

After creation, you can see the management interface of the created image project
A concise guide to using image warehouse

For this project, you can add members that can be accessed and give them permissions:
A concise guide to using image warehouse

Among them,

1) Summary: displays the total capacity of the project and the number of mirror warehouses.

2) Image warehouse: users actually manage all images.

3) Member: it is used to maintain the member management and different access rights control that can access the image warehouse.

4) Label: used to manage the existing image labels in the image library.

5) Configuration management: configure the basic control of the image warehouse, such as whether the image warehouse is publicly accessed, whether to scan vulnerabilities, vulnerability white list and validity period, etc.

Others are not commonly used, so I won’t introduce them for the time being.

3、 Create image warehouse and push image

Precondition: you need to be familiar with the related commands and operations of docker image push and pull.

Get the address and command of the push

In the project management interface, under the “image warehouse” tab, click the “docker command to push image” on the right, and the system will prompt to push image related commands. Click the small box on the right to copy the command. The advantage of copying this command is that the system has automatically spelled out the URL of the target address to be pushed for you, and you only need to modify the source_ Image [: tag] and image [: tag] are your own image names.
A concise guide to using image warehouse

Take pushing Hello world image to image warehouse as an example: (how to generate image is not described here, please refer to the example of running Hello world in docker)
A concise guide to using image warehouse

Remember the three steps of docker push image

1. Docker login to image warehouse server

2. Docker tag tag the local image to the image warehouse server

3. Docker push image to image warehouse

Docker login image warehouse

Docker login -- user name = testuser -- password = XXXX harbor server address

Note: the following login failures may occur in the first docker command line login. For details, please refer to the measures for handling the failure of the first docker login to the harbor service

Call docker tag

docker tag hello-world:latest xxxx/project-test/hello-world:1.0

Push image

docker push xxxx/project-test/hello-world:1.0

Note: where, XXXX is the address of the Gabor server, project test is the new image management project, hello- world:1.0 For the specific image
After the push is successful, the display in the warehouse is as follows:

A concise guide to using image warehouse

Click the image pushed to see the images of different tags, as follows:

A concise guide to using image warehouse

So far, the image operation of Gabor push is completed. For subsequent use, just follow the docker pull command.
followPlay chess firstWeChat official account for more dry cargo
A concise guide to using image warehouse
This paper is written byPlay chess first www.root1024.comExclusive release!

Recommended Today

Large scale distributed storage system: Principle Analysis and architecture practice.pdf

Focus on “Java back end technology stack” Reply to “interview” for full interview information Distributed storage system, which stores data in multiple independent devices. Traditional network storage system uses centralized storage server to store all data. Storage server becomes the bottleneck of system performance and the focus of reliability and security, which can not meet […]