Docker私有仓库 Harbor

Posted by Sunday on 2019-03-09

https://github.com/goharbor/harbor/releases
下载离线版本 Harbor offline installerhttps://storage.googleapis.com/harbor-releases/release-1.7.0/harbor-offline-installer-v1.7.1.tgz

1
2
cd /usr/local
wget https://storage.googleapis.com/harbor-releases/release-1.7.0/harbor-offline-installer-v1.7.1.tgz

修改端口

1
2
3
4
5
6
7
8
9
10
vim harbor.cfg
#hostname = reg.mydomain.com
hostname = registry.sundayle.com:5000

vim docker-compose.yml
ports:
#- 80:80
- 5000:80
- 443:443
- 4443:4443

1
2
./prepare 
docker-compose up -d

ERROR: Get https://registry.xwx.cn:5000/v2/: http: server gave HTTP response to HTTPS client

1
2
3
4
5
6
root@web41:/data/config# cat /etc/docker/daemon.json 
{
"data-root": "/data/docker",
"registry-mirrors": ["https://8vf7m3dk.mirror.aliyuncs.com", "https://registry.docker-cn.com"],
"insecure-registries": ["registry.sundayle.com:5000"]
}