Ubuntu 20.04搭建harbor
# vi /etc/apt/sources.list
?deb [arch=amd64] https://download.docker.com/linux/ubuntu focal ?stable
:wq
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# apt-get update
# apt-get install docker-ce
# vi /etc/systemd/system/multi-user.target.wants/docker.service
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --data-root=/space/docker
:wq
# systemctl daemon-reload
# systemctl restart docker
# apt-get install python3-pip
# pip3 install docker-compose
下载网址:
https://github.com/goharbor/harbor/releases/download/v2.1.0/harbor-offline-installer-v2.1.0.tgz
# cd /space
# tar zxfv harbor-offline-installer-v2.1.0.tgz
# cd harbor
# mv harbor.yml.tmpl harbor.yml
# vi harbor.yml
设置下hostname
注掉http和80
配置下https的证书
:wq
# ./install.sh
正常会显示successfully
访问:https://ip或域名 ? ? ? 默认账号:admin ? 密码:Harbor12345
?
原文:https://blog.51cto.com/yangzhiming/2948889