1. Open source warehouse management tool Harbor 2 Installation There are many ways to install 2.1 Install Docker and Docker-compose First, Install wget http://rancher-mirror.cnrancher.com/docker-compose/v1.27.4/docker-compose-Linux-x86_64 mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose chmod a+x /usr/local/bin/docker-compose 2.2 Install Harbor2.2.1 Download and decompress First go to GitHub Release to download the corresponding package. There are two types: download: wget https://github.com/goharbor/harbor/releases/download/v2.1.1/harbor-online-installer-v2.1.1.tgz Unzip: tar zxvf harbor-online-installer-v2.1.1.tgz 2.2.2 Configuration and installation Prepare the configuration file: cp harbor.yml.tmpl harbor.yml Modify the configuration: hostname: 8.134.18.166 http: port: 8088 # https related config #https: # https port for harbor, default is 443 # port: 443 # The path of cert and key files for nginx #certificate: /your/certificate/path #private_key: /your/private/key/path harbor_admin_password: Harbor12345 After changing the configuration, start the installation: ./install.sh A prompt will appear if the installation is successful. 3. Easy to use3.1 Create a user with admin Visit: The management user Create user information: 3.2 New User Creates a Project Exit Project created successfully: 3.3 Docker connection warehouse3.3.1 Modify Docker configuration and restart Configure vi /etc/docker/daemon.json The content after configuration is as follows: { "insecure-registries": ["http://8.134.18.166:8088"], "registry-mirrors": ["https://xxx.mirror.aliyuncs.com"], "exec-opts": ["native.cgroupdriver=systemd"], "log-driver": "json-file", "log-opts": { "max-size": "100m" }, "storage-driver": "overlay2" } Restart systemctl restart docker 3.3.2 Login and push image Log in to the newly created warehouse: $ docker login http://8.134.18.166:8088 --username pkslow --password Pk123456 WARNING! Using --password via the CLI is insecure. Use --password-stdin. WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store Login Succeeded docker tag nginx 8.134.18.166:8088/pkslow/nginx:latest Upload the image to the repository: $ docker push 8.134.18.166:8088/pkslow/nginx:latest The push refers to repository [8.134.18.166:8088/pkslow/nginx] cdd1d8ebeb06: Pushed fe08d9d9f185: Pushed 280ddd108a0a: Pushed f14cffae5c1a: Pushed d0fe97fa8b8c: Pushed latest: digest: sha256:4949aa7259aa6f827450207db5ad94cabaa9248277c6d736d5e1975d200c7e43 size: 1362 Go to the web page to check, there is already a corresponding mirror: Pulling will not be demonstrated. This is the end of this article about how to use Harbor to build a private Docker repository. For more information about how to use Harbor to build a private Docker repository, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL integrity constraints definition and example tutorial
>>: In-depth study of how to use positioning in CSS (summary)
Table of contents 1 Problems encountered in trans...
I finally finished the project at hand, and the m...
Hello everyone, today I want to share with you ho...
Table of contents 1. Component Communication 1. P...
Including the use of check boxes and radio buttons...
Preface: Timestamp fields are often used in MySQL...
Preface In the past, I always switched Python ver...
Several Differences Between MySQL 5.x and MySQL 8...
This article is translated from the blog Usability...
The specific code for implementing skinning with ...
Using the <img> element with the default sr...
1. Reasons If the system is Centos7.3, the Docker...
This article shares the specific code of JavaScri...
I searched for many ways to change it online but ...
You can see that their visual effects are very bea...