下载离线安装包
wget https://github.com/goharbor/harbor/releases/download/v2.11.1/harbor-offline-installer-v2.11.1.tgz
解压
tar -zxvf harbor-offline-installer-v2.11.1.tgz
复制一份配置文件出来,修改配置
cp harbor.yml.tmpl harbor.yml
vim harbor.yml
修改域名/IP,修改端口,根据需求是否部署ssl证书
修改初始密码
执行安装
./install.sh
docker推送镜像前,需要在docker守护进程配置文件中增加配置
{
"insecure-registries": ["43.135.174.xxx:5110"]
}
推送命令
# 登录
docker login -u admin -p 6YGb3AIfoo 43.135.174.xxx:5110
# 将该镜像标志为要推送到私有仓库
docker tag sync-php:latest 43.135.174.xxx:5110/library/sync-php:latest
# 上传镜像
docker push 43.135.174.xxx:5110/library/sync-php:latest