这里写自定义目录标题
harbor下载地址https://github.com/vmware/harbor/releases
# 解压harbor文件
tar -zxf harbor-offline-installer-v1.10.1.tgz
[root@server1 harbor]# vim harbor.yml
hostname: reg.westos.org
# http related config
http:
# port for http, default is 80. If https enabled, this port will redirect to https port
port: 80
# https related config
https:
# https port for harbor, default is 443
port: 443
# The path of cert and key files for nginx
certificate: /data/certs/westos.org.crt 证书
private_key: /data/certs/westos.org.key
docker-compose的路径(我之前就安装了)
[root@server1 bin]# pwd docker-compose
/usr/local/bin
chmod +x docker-compose
- 端口映射
[root@server1 harbor]# iptables -t nat -nL
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DOCKER all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DOCKER all -- 0.0.0.0/0 !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 172.18.0.0/16 0.0.0.0/0
MASQUERADE all -- 172.17.0