当前位置:网站首页>Harbor image warehouse construction
Harbor image warehouse construction
2022-07-05 11:22:00 【Ji Songsong】
Harbor Image warehouse construction
1、 Install the underlying requirements
- Python Should be 2.7 Or later
- Docker Engine should be 1.10 Or later
- DockerCompose Need to be for 1.6.0 Or later
2、Harbor install
Harbor Official address :
https://github.com/vmware/harbor/releases

To configure harbor.yml
$ tar -zxvf harbor-online-installer-v2.5.2.tgz # With online installation
$ cd harbor && vim harbor.yml
...
hostname: harbor.registry.com # The host name or fully qualified domain name of the target
http: # Default http agreement , If https It works , Can automatically jump https
port: 80 # External access port
#https: #https If you need a certificate, you can comment first
# port: 443
# certificate: /your/certificate/path # Certificate storage path
# private_key: /your/private/key/path # Private key storage path
...
harbor_admin_password: Harbor12345 # Sign in harbor Default password
database:
password: root123 # Database default connection password
....
data_volume: /data # Set up Harbor Data storage directory
...
log: # Set log related information
level: info # Set the log level
local:
rotate_count: 50 # Number of logs reserved
rotate_size: 200M # The size of each log
location: /var/log/harbor # Log storage path
$ ./install.sh
[Step 4]: starting Harbor ...
.....
----Harbor has been installed and started successfully.---- # Indicates successful build

Log in using the command line Harbor, And upload and download images
because docker By default, the pull image is https agreement , We need to be in /etc/docker/daemon.json Middle configuration insecure-registries.
{
"insecure-registries": ["harbor.registry.com"] }
$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
170.18.9.141 harbor.registry.com
$ systemctl restart docker
$ docker login harbor.registry.com # Log in to the warehouse , The certification information is retained in / Home directory /.docker/config.json In file
Username: admin
Password:
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
# Label the image as consistent with the warehouse image
$ docker tag nginx:latest harbor.registry.com/library/nginx:v1
# Push the mirror
$ docker push harbor.registry.com/library/nginx:v1
The push refers to repository [harbor.registry.com/library/nginx]
e7344f8a29a3: Pushed
44193d3f4ea2: Pushed
41451f050aa8: Pushed
b2f82de68e0d: Pushed
d5b40e80384b: Pushed
08249ce7456a: Pushed
v1: digest: sha256:3536d368b898eef291fb1f6d184a95f8bc1a6f863c48457395aab859fda354d1 size: 1570

To configure Harbor Of HTTPS visit
Refer to the article in the stack self-control https certificate , After the certificate is generated , Put in harbor.yml In the configuration file certificate,private_key Under the path corresponding to the parameter .
边栏推荐
- 2022 Pengcheng cup Web
- Bidirectional RNN and stacked bidirectional RNN
- vite//
- Guys, I tested three threads to write to three MySQL tables at the same time. Each thread writes 100000 pieces of data respectively, using F
- spark调优(一):从hql转向代码
- R3live series learning (IV) r2live source code reading (2)
- 高校毕业求职难?“百日千万”网络招聘活动解决你的难题
- Modulenotfounderror: no module named 'scratch' ultimate solution
- iframe
- 不要再说微服务可以解决一切问题了!
猜你喜欢

Intelligent metal detector based on openharmony

Codeforces Round #804 (Div. 2)

基于OpenHarmony的智能金属探测器

How to introduce devsecops into enterprises?

基础篇——REST风格开发

Ddrx addressing principle

分类TAB商品流多目标排序模型的演进

Pytorch training process was interrupted

数据库三大范式

Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
随机推荐
Msfconsole command encyclopedia and instructions
【Oracle】使用DataGrip连接Oracle数据库
Harbor镜像仓库搭建
About the use of Vray 5.2 (self research notes)
无密码身份验证如何保障用户隐私安全?
What about SSL certificate errors? Solutions to common SSL certificate errors in browsers
-26374 and -26377 errors during coneroller execution
Basic part - basic project analysis
9、 Disk management
Redis如何实现多可用区?
An error is reported in the process of using gbase 8C database: 80000305, host IPS long to different cluster. How to solve it?
修复动漫1K变8K
iframe
2022 chemical automation control instrument examination questions and online simulation examination
Go language learning notes - analyze the first program
R3live series learning (IV) r2live source code reading (2)
How can edge computing be combined with the Internet of things?
Scaffold development foundation
[Oracle] use DataGrid to connect to Oracle Database
Beego cross domain problem solution - successful trial