标签:done ase eating lan 扩展 lib 链接 name sys
Harbor是一个开源的云原生registry工程。Harbor对开源的Docker Distribution扩进行了扩展,支持registries之间镜像的复制功能,而且还提供了一些高级的安全方面的功能,例如用户管理,访问控制和行为审计。详细的说明可以参照官网【1】。
通常,将Harbor安装在linux上。在安装Harbor之前,必须确保机器上已经安装了docker 17.06.0-ce+和docker-compose 1.18.0+。
从官网【2】上下载安装文件。安装文件有两个版本,offline installer和online installer。Online版本需要从网络上下载一些文件,其他没有什么本质区别。这里我用的是最新的版本v1.9.1。
下载完成之后,解压缩:
tar -xvf harbor-online-installer-v1.9.1.tgz
harbor/prepare
harbor/LICENSE
harbor/install.sh
harbor/harbor.yml
切换到root账户,进入harbor文件夹,修改配置文件harbor.yml:
hostname: <HOSTNAME/IP>
运行安装文件:
./install.sh
...
Creating harbor-log ... done
Creating registry ... done
Creating harbor-portal ... done
Creating harbor-db ... done
Creating redis ... done
Creating registryctl ... done
Creating harbor-core ... done
Creating harbor-jobservice ... done
Creating nginx ... done
? ----Harbor has been installed and started successfully.----
Now you should be able to visit the admin portal at http://<HOSTNAME/ID>.
For more details, please visit https://github.com/goharbor/harbor .
这时Harbor已经安装好了:
http://<HOSTNAME/IP>
/
默认用户名/密码:
admin/Harbor12345
/etc/docker/daemon.json
{
"insecure-registries": [
"<HOSTNAME/IP>"
]
}
如果port为443(https),则不需要修改daemon.json添加registry,必须配置cert,更多的信息可以参考官网。
systemctl restart docker
docker-compose up -d
login docker login <HOSTNAME/IP>
docker tag nginx:v1 slc09ydn.us.oracle.com/library/nginx:v1
docker push slc09ydn.us.oracle.com/library/nginx:v1
docker logout <HOSTNAME/IP>
docker pull slc09ydn.us.oracle.com/library/nginx:v1
【1】https://github.com/goharbor/harbor
【2】https://github.com/goharbor/harbor/releases
标签:done ase eating lan 扩展 lib 链接 name sys
原文地址:https://www.cnblogs.com/ExMan/p/11996938.html