环境:
Centos7.5
cp docker-compose /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
tar cvzf docker.tar.gz docker/
解压后的包:
audit-libs-2.8.1-3.el7_5.1.x86_64.rpm
audit-libs-python-2.8.1-3.el7_5.1.x86_64.rpm
audit-2.8.1-3.el7_5.1.x86_64.rpm
checkpolicy-2.5-6.el7.x86_64.rpm
libcgroup-0.41-15.el7.x86_64.rpm
libsemanage-python-2.5-11.el7.x86_64.rpm
libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
policycoreutils-python-2.5-22.el7.x86_64.rpm
python-IPy-0.75-6.el7.noarch.rpm
setools-libs-3.3.8-2.el7.x86_64.rpm
docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
yum -y localinstall *.rpm
systemctl enable docker
systemctl restart docker
查看docker和docker-compose版本:
docker version
docker-compose version
harbor离线包可以去github下载最新版本,我这里已离线到fd.tn下载库。
wget http://fd.tn/work/harbor/harbor.orientsoft.cn/harbor-v1.5.0/harbor-offline-installer-v1.5.0.tgz
tar xf harbor-offline-installer-v1.5.0.tgz
配置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 reg.xxx.com –key-file /opt/certs/reg.xxx.com.key –fullchain-file /opt/certs/fullchain.cer
编译harbor配置文件:
vim harbor.cfg
域名:
hostname = reg.xxx.com
协议:
ui_url_protocol = https
证书配置:
ssl_cert = /opt/certs/fullchain.cer
ssl_cert_key = /opt/certs/reg.xxx.com.key
默认为mysql数据库方式:
db_password = 数据库密码
设置webui登录密码:
harbor_admin_password = webui管理密码
开始部署:
./install.sh
如何提交镜像到docker仓库?
docker login reg.xxx.com
docker images
docker ps
docker commit -m=”fix bug” e1aba466ced8 lnmp
docker images
docker tag 98b45121ea06 reg.xxx.com/diancan/lnmp:v0.1
docker push reg.xxx.com/diancan/lnmp:v0.1
最新评论
世间因为有你而美丽!我也一直想当个志愿者,奈何身体不允许
告诉那小孩 叫哥哥
666
123
此时此刻,感慨万千,旧的一年已经过去,新的一年已经到来,展望未来,美好的日子正等 着我们去奋斗,愿在新的一年里,我们能够继续经受住考验,克服困难,春暖花开
智能插座都是扯,插座还是公牛好用
下载链接失效了 求补
连接失效了