安装harbor镜像仓库

[root@localhost data]# unzip harbor-master.zip ^C
[root@localhost data]# cd harbor-master
[root@localhost harbor-master]# ls
ADOPTERS.md  CHANGELOG.md  contrib          docs          LICENSE  Makefile   README.md    ROADMAP.md   src    tools
api          codecov.yml   CONTRIBUTING.md  gskey.sh.enc  make     OWNERS.md  RELEASES.md  SECURITY.md  tests  VERSION
[root@localhost harbor-master]# cd make/
[root@localhost make]# ls
checkenv.sh  common.sh  harbor.yml.tmpl  install.sh  migrations  photon  prepare  pushimage.sh
[root@localhost make]# sh install.sh

[Step 0]: checking if docker is installed ...

Note: docker version: 19.03.8

[Step 1]: checking docker-compose is installed ...
✖ Need to install docker-compose(1.18.0+) by yourself first and run this script again.

 安装harbor的前提条件:

  1、docker版本在18及以上

  2、docker-compose版本在1.18.0版本以上。

安装docker-compose

对于alpine,需要以下依赖包:py-pip、python-dev、libffi-dev、openssl-dev、gcc、libc-dev和make。

1、运行此命令下载Docker Compose当前稳定版本:

sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

要安装不同版本的Compose,请将1.25.5替换为要使用的Compose版本。

2、添加可执行权限

sudo chmod +x /usr/local/bin/docker-compose

 注意:如果安装后docker compose命令失败,请检查路径。您还可以创建到/usr/bin或路径中任何其他目录的符号链接。

For example:

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

 Test the installation.

docker-compose --version
docker-compose version 1.25.5, build 1110ad01

猜你喜欢

转载自www.cnblogs.com/linuxws/p/12809833.html