万世威 2020-10-16
https://goharbor.io/docs/2.0.0/install-config/
1、软硬件版本要求
https://goharbor.io/docs/2.0.0/install-config/installation-prereqs/
Docker engine | Version 17.06.0-ce+ or higher |
---|---|
Docker Compose | Version 1.18.0 or higher |
升级 Docker 版本
https://blog.csdn.net/weixin_43941364/article/details/106406185
安装 Docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.18.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
2、下载安装包
https://github.com/goharbor/harbor/releases
3、配置 Harbor 的 yaml 文件
https://goharbor.io/docs/2.0.0/install-config/configure-yml-file/
hostname: x.x.x.x # 不要使用 localhost、127.0.0.1
# 注释掉 HTTPS 相关内容
4、启动
sh install.sh
# 1、docker 配置文件中添加以下 配置 并重启
"insecure-registries": [
"192.168.2.163"
]
# 2、先本地登录一次,生成配置信息[不然不知道用户信息,推送会失败]
docker login ip:port
# 3、创建 tag,docker push 192.168.2.163/test/IMAGE[:TAG]
docker tag portainer/portainer 192.168.2.163/test/portainer
docker push 192.168.2.163/test/portainer
# Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
systemctl start docker
# The protocol is https but attribute ssl_cert is not set
# 注释掉 yaml 中 https 相关内容
# mac 上部署,需要在 harbor.yml 、docker-post.yml 中调整部分配置【权限问题导致】
# for example:/var/log/harbor