Harbor部署

Harbor部署

Docker Compose官方文档
Harbor官方文档

安装docker-compose前需要部署的步骤
在这里插入图片描述
在这里插入图片描述
要下载并安装撰写 CLI 插件,请运行:

DOCKER_CONFIG=KaTeX parse error: Expected '}', got 'EOF' at end of input: …DOCKER_CONFIG:-HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.7.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose

[root@harbor ~]# DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
[root@harbor ~]# mkdir -p $DOCKER_CONFIG/cli-plugins
[root@harbor ~]# ls -a
.   anaconda-ks.cfg  .bash_logout   .bashrc  .docker  .viminfo
..  .bash_history    .bash_profile  .cshrc   .tcshrc
[root@harbor ~]# ls .docker/
cli-plugins
[root@harbor ~]# 
[root@harbor ~]# curl -SL https://github.com/docker/compose/releases/download/v2.7.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
[root@harbor ~]# cd /root/.docker/cli-plugins/
[root@harbor cli-plugins]# ls
docker-compose-linux-x86_64.octet-stream
[root@harbor cli-plugins]# mv docker-compose-linux-x86_64.octet-stream docker-compose
[root@harbor cli-plugins]# pwd
/root/.docker/cli-plugins
[root@harbor cli-plugins]# cd
[root@harbor ~]# 

给它一个执行权限

[root@harbor cli-plugins]# chmod +x docker-compose 
[root@harbor cli-plugins]# ll
total 25188
-rwxr-xr-x. 1 root root 25792512 Aug 11 21:54 docker-compose

把它链接起来

[root@harbor cli-plugins]# pwd
/root/.docker/cli-plugins
[root@harbor cli-plugins]# ln -s /root/.docker/cli-plugins/docker-compose /usr/bin/


这些能显示出来就说明装好了

[root@harbor cli-plugins]# cd
[root@harbor ~]# which docker-compose 
/usr/bin/docker-compose
[root@harbor ~]# 
[root@harbor cli-plugins]# cd
[root@harbor ~]# which docker-compose 
/usr/bin/docker-compose
[root@harbor ~]# docker compose version
Docker Compose version v2.7.0
[root@harbor ~]# 

去网上把harbor-offline-installer-v2.5.3.tgz这个把下载好然后用远程传进来

[root@harbor ~]# ls
anaconda-ks.cfg  harbor-offline-installer-v2.5.3.tgz
[root@harbor ~]# 

解压

[root@harbor ~]# tar xf harbor-offline-installer-v2.5.3.tgz -C /usr/local
[root@harbor ~]# cd /usr/local/
[root@harbor local]# ls
bin  etc  games  harbor  include  lib  lib64  libexec  sbin  share  src
[root@harbor local]# 


先修改主机名

[root@harbor ~]# hostnamectl set-hostname harbor.example.com
[root@harbor ~]# bash
[root@harbor ~]# 


没有就复制一个然后修改配置文件

[root@harbor local]# cd harbor/
[root@harbor harbor]# 
[root@harbor harbor]# ls
common.sh             harbor.yml.tmpl  LICENSE
harbor.v2.5.3.tar.gz  install.sh       prepare
[root@harbor harbor]# cp harbor.yml.tmpl harbor.yml
[root@harbor harbor]# 
[root@harbor harbor]# vim harbor.yml
[root@harbor harbor]# cat harbor.yml
# Configuration file of Harbor

# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: harbor.example.com		//这里是主机名,改成harbor.exam
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值