鲲鹏服务器 ARMV8架构Harbor-2.3.0 Docker hun在线方式部署
之前出了从源码编译的部署,过程是又臭又长,小伙伴们觉得麻烦的可以看这篇直接从Docker Hub上下载部署,话不多说让我们开始吧!
前面安装docker,docker-compose环境已经安装好的可以直接看第三步
一、安装docker-19.03.10
相关文档:https://www.hikunpeng.com/document/detail/zh/kunpengcpfs/ecosystemEnable/Docker/kunpengdocker_03_0004.html
vim /etc/selinux/config
在线获取安装
wget https://download.docker.com/linux/static/stable/aarch64/docker-19.03.10.tgz
tar zxf docker-19.03.10.tgz
cp docker/* /usr/bin
配置docker.service文件
编辑docker.service文件
vim /usr/lib/systemd/system/docker.service
添加以下内容
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
启动Docker服务进程。
systemctl start docker
查看安装情况。
docker version
二、安装docker-compose-1.22.0
相关文档:https://github.com/ubiquiti/docker-compose-aarch64/releases/tag/1.22.0
mkdir -p /opt/tools/installed/docker-compose/bin
下载
cd /opt/tools/installed/docker-compose/bin
wget https://github.com/ubiquiti/docker-compose-aarch64/releases/download/1.22.0/docker-compose-Linux-aarch64
ln -s docker-compose-Linux-aarch64 docker-compose
chmod u+x docker-compose-Linux-aarch64
更新环境配置
vim /etc/profile
#JAVA_HOME=/opt/tools/installed/jdk8u191-b12
#MAVEN_HOME=/opt/tools/installed/apache-maven-3.5.4
DOCKER_COMPOSE_HOME=/opt/tools/installed/docker-compose
PATH=
JAVA_HOME/bin:
PATH
export MAVEN_HOME JAVA_HOME PATH DOCKER_COMPOS
source /etc/profile
验证
docker-compose -v
三、harbor相关部分
mkdir -p /data
git clone https://github.com/goharbor/harbor.git
cd harbor
git checkout -b v2.3.0 v2.3.0
创建下载脚本
cd make
vim download_images.sh
输入i使得文本处于可插入状态,将下述文件内容拷贝进download_images.sh中,然后按esc
后输入:wq保存退出。
namespace=remoyang
version=v2.3.0
imgs=(
redis-photon
harbor-db
harbor-jobservice
harbor-log
nginx-photon
registry-photon
harbor-registryctl
notary-signer-photon
notary-server-photon
trivy-adapter-photon
chartmuseum-photon
harbor-exporter
prepare
harbor-portal
harbor-core
)
for img in ${imgs[@]}
do
docker pull $namespace/$img:$version
docker tag $namespace/$img:$version goharbor/$img:$version
done
docker pull $namespace/swagger:v0.25.0
docker tag $namespace/swagger:v0.25.0 goharbor/swagger:v0.25.0
执行下载脚本
sh download_images.sh
sed -i ‘s#goharbor/prepare:dev#goharbor/prepare:v2.3.0#g’ prepare
使用模板生成harbor.yml
cp harbor.yml.tmpl harbor.yml
#harbor.yml 我这边是用http方式修改配置关闭https
hostname: 192.168.0.XX #配置harbor的域名 我这在华为云上的,我配置该服务器的内网IP
http:
port: 80
# https:
# port: 7443
# certificate: /data/harbor/cert/fly.cn.crt #证书
# private_key: /data/harbor/cert/fly.cn.key #证书
安装启动harbor
./install.sh
- 点赞
- 收藏
- 关注作者
评论(0)