您的位置:首页 > 运维架构 > Linux

vmware harbor源码编译

2016-06-13 00:22 483 查看


harbor源码编译


GitHab 主页 https://github.com/vmware/harbor
1. 下载 zip
包,
解压

wget https://github.com/vmware/harbor/archive/master.zip; unzip master.zip

2. 配置 --
编辑 harbor.cfg文件

echo "54.172.***.** ip-172-30-0-20.ec2.internal"
>> /etc/hosts
(说明:请更换成自己的外部可访问ip)
/usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/docker daemon -H fd:// --insecure-registry172.30.0.20:5000

2.1 进入 Deploy
目录
[root@ip-172-30-0-20 harbor-master]# cd harbor-master/Deploy/
[root@ip-172-30-0-20 Deploy]#

2.2 修改参数
hostname: (必须修改)
#hostname = reg.mydomain.com
hostname = ip-172-30-0-20.ec2.internal

使用HTTP模式,
其他参数,暂不修改。

 

2.3 prepare, 生成配置文件
[root@ip-172-30-0-20 ~]# cd /home/gopath/harbor-master/Deploy/
[root@ip-172-30-0-20 Deploy]# ls
config 
db 
docker-compose.yml 
harbor.cfg kubernetes 
log 
prepare templates
[root@ip-172-30-0-20 Deploy]# ./prepare

Generated configuration file: ./config/ui/env
Generated configuration file: ./config/ui/app.conf
Generated configuration file: ./config/registry/config.yml
Generated configuration file: ./config/db/env
Clearing the configuration file: ./config/ui/private_key.pem
Clearing the configuration file: ./config/registry/root.crt
Generated configuration file: ./config/ui/private_key.pem
Generated configuration file: ./config/registry/root.crt
The configuration files are ready, please use docker-compose to start theservice.

2.4
启动
sudo docker-compose up -d

2.5 生成镜像

。。。。。。。。。。。

(省略)

Step 15 : EXPOSE 80
 ---> Running in 1c1413800b79
 ---> 668989cf111b

Removing intermediate container 1c1413800b79

Successfully built 668989cf111b

WARNING: Image for service ui was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Harbor vmware 编译 Linux