docker安装harbor配置域名和证书

               代表自己配置的地方         

1. 系统要求            

On a Linux host: docker 17.06.0-ce+ and docker-compose 1.18.0+ .

docker : 17.06.0-ce以上版本

docker-compose :1.18.0+以上版本

2. 安装步骤

Step 1 :Download the installer; Step 2 : Configure harbor.yml; Step 3:Run install.sh to install and start Harbor;

 Step1:Download the installer

安装wget:

yum -y install wget

wget https://storage.googleapis.com/harbor-releases/release-1.8.0/harbor-offline-installer-v1.8.1.tgz 

[root@YZ-25-25-25 ~]# tar zxvf harbor-offline-installer-v1.8.1.tgz harbor/harbor.v1.8.1.tar.gz harbor/prepare harbor/LICENSE harbor/install.sh harbor/harbor.yml [root@YZ-25-25-25 ~]# ls harbor harbor-offline-installer-v1.8.1.tgz spark-2.4.0-bin-hadoop2.7 spark-2.4.0-bin-hadoop2.7.tgz [root@YZ-25-25-25 ~]# cd harbor [root@YZ-25-25-25 harbor]# ls harbor.v1.8.1.tar.gz harbor.yml install.sh LICENSE prepare

Step2:Configure harbor.yml;

配置Let's Encrypt证书,这里我就直接acme了,方便快捷。
yum -y install socat
curl https://get.acme.sh | sh
sh acme.sh --issue -d reg.xxx.com --standalone
mkdir -p /opt/certs
cd ~/.acme.sh/
sh acme.sh --installcert -d 123.com --key-file /opt/certs/123.com.key --fullchain-file /opt/certs/fullchain.cer

修改配置文件

#vi harbor.yml

域名:
hostname = 123.com(自己申请的域名)
协议:
ui_url_protocol = https
证书配置:
ssl_cert = /opt/certs/fullchain.cer
ssl_cert_key = /opt/certs/123.com.key(自己域名的key)
默认为mysql数据库方式:
db_password = root数据库密码
设置harbor登录密码:
harbor_admin_password = Harbor12345(默认)

Step3:Run install.sh to install and start Harbor;

./install.sh

3. 测试结果

查看是否所有容器都已经创建成功并处于UP状态
docke ps -a 

d5f247b68722beb5efc15b5f0a15a1f4e7d.jpg

c6a9b9eab5fb10ff20f7dd527aa85e12308.jpg

转载于:https://my.oschina.net/u/4035240/blog/3094337

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值