关于docker版本和docker Compose 版本
参考:blog.51cto.com/u_16213321/…
关于harbor下载
关于版本
由于k8s安装的docker 20.10.+ 所以Docker Compose版本:1.29.x harbor版本:2.4.1
下载 docker-compose,harbor
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# 下载harbor,可以考虑下载到本地,然后上次到对应的服务器
wget https://github.com/goharbor/harbor/releases/download/v2.4.1/harbor-offline-installer-v2.4.1.tgz
tar zxvf harbor-offline-installer-v2.4.1.tgz
# 复制 harbor.yaml.tmpl 转换成harbor.yaml
cp harbor.yaml harbor.yaml.tmpl
# vim harbor.yaml 更改你需要的内容,hostname,port端口,禁用https,更改密码
hostname: harbor
port: 8070
#https:
# https port for harbor, default is 443
# port: 443
# The path of cert and key files for nginx
#certificate: /your/certificate/path
# private_key: /your/private/key/path
harbor_admin_password: xxx
启动harbor
./install.sh --with-chartmuseum
# 启动成功最后一步
[Step 5]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating network "harbor_harbor-chartmuseum" with the default driver
Creating harbor-log ... done
Creating redis ... done
Creating harbor-portal ... done
Creating registryctl ... done
Creating registry ... done
Creating harbor-db ... done
Creating chartmuseum ... done
Creating harbor-core ... done
Creating harbor-jobservice ... done
Creating nginx ... done
✔ ----Harbor has been installed and started successfully.----
遇到的问题
ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-3fa03c229afb -j RETURN: iptables: No chain/target/match by that name. (exit status 1))
参考:blog.csdn.net/weixin_5034…