1、安装docker docker-compose
docker-compose安装参考:Docker Compose | 菜鸟教程
sudo curl -L "https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2、harbor 参考;Harbor----使用 Harbor 安装包安装部署 Harbor_mojolang的博客-CSDN博客
建议先下载后再安装
wget https://github.com/goharbor/harbor/releases/download/v2.8.0/harbor-offline-installer-v2.8.0.tgz (速度慢)
采用代理速度快
wget https://ghproxy.com/https://github.com/goharbor/harbor/releases/download/v2.8.0/harbor-offline-installer-v2.8.0.tgz
解压 tar zxvf harbor-offline-installer-v2.8.0.tgz -C /usr/local/
docker2375端口开放
Docker私有仓库打开2375端口_docker 2375-CSDN博客
登录docker所在服务器,修改docker.service文件
vi /usr/lib/systemd/system/docker.service
修改如下内容:
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
改为:
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
配置如下 /etc/docker/daemon.json
{ "insecure-registries": ["192.168.43.10"] }
harbor 启用https 不需要harbor.cfg
Docker仓库Harbor搭建并设置HTTPS - 灰信网(软件开发博客聚合)
certificate: /usr/local/harbor/cert/ca.crt private_key: /usr/local/harbor/cert/ca.key