Docker image warehouse construction (based on Alibaba Cloud public network image warehouse and Harbor private image warehouse)

  • Build Alibaba Cloud public network image warehouse
    1.1 Register an Alibaba Cloud account and log in to the homepage, enter the keyword "Container Image Service" in the search carnival
    Insert image description here
    1.2 Enter the [Container Image Service Interface] to create the corresponding container image instance according to your actual needs. I am a personal application, so I choose [Create a personal version instance]
    1.3 What you need before creating the image warehouse First create a [namespace]
    Insert image description here
    1.4 To create a mirror warehouse, click the [Create Mirror Warehouse] button in the upper left corner of the mirror warehouse list to enter the interface for creating a mirror warehouse
    Insert image description here
    1.5 Fill in the completed information, click [Next] to enter the code association interface, select [Local Warehouse] on the far right, and then click [Create Mirror Warehouse]. After the creation is completed, enter the basic information interface, follow the basic information setting steps You can perform mirroring-related operations based on [Alibaba Cloud Mirror Warehouse]; click [Back Icon] to return to the mirror warehouse list
    Insert image description here

2. Construction of harbor private image warehouse
2.1 Installation of the basic environment before harbor installation, before installing harbormust be done Installationdocker anddocker-compose two basics Application
2.2docker installation
Docker installation detailed steps reference
2.3docker-compose installation, after testing, there are two better to use Installation method
2.3.1 Method 1: Installation based on daocloud cloud method, execute the following two lines of code in order to complete the installation (Online installation a> method is suitable for situations where the computer can communicate with the external network. It is also a relatively simple method in my opinion)

```bash
curl -L https://get.daocloud.io/docker/compose/releases/download/v2.7.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
```

After the execution is completed, use the docker-compose -v command to check whether the installation is successful. If the version number and other information appears, the installation is successful
2.3.2 Method 2

  • Download the installation package: https://github.com/docker/compose/releases

  • Upload the installation package to the server and move the files to the /usr/local/bin directory

    mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
    
  • Add execution permissions

    chmod +x /usr/local/bin/docker-compose
    
  • test

    docker-compose -v
    

    Check docker-compose version
    2.4harbor installation
    harbor installation reference link

Guess you like

Origin blog.csdn.net/yangfenggh/article/details/125953170