For HTTP protocol
1.Modify docker-compose.yml
Replace the first "80" to a customized port, e.g. 8888:80.
proxy:
image: goharbor/nginx-photon:v1.6.0
container_name: nginx
restart: always
volumes:
- ./common/config/nginx:/etc/nginx:z
ports:
- 8888:80
- 443:443
depends_on:
- postgresql
- registry
- core
- portal
- log
logging:
driver: "syslog"
options:
syslog-address: "tcp://127.0.0.1:1514"
tag: "proxy"
2.Modify harbor.cfg, add the port to the parameter "hostname"
hostname = 192.168.0.2:8888