debian11部署harbor

在Debian 11上部署Harbor,您可以遵循以下步骤:

1.安装Docker和相关依赖:

sudo apt update
sudo apt install ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

 

2.启动Docker服务并设置开机自启:

sudo systemctl enable docker
sudo systemctl start docker

 

3.下载Harbor OFFLINE安装包

wget https://github.com/goharbor/harbor/releases/download/v2.5.2/harbor-offline-installer-v2.5.2.tgz

  

4.解压Harbor安装包并进入目录

tar xf harbor-offline-installer-v2.5.2.tgz
cd harbor

  

5.复制配置文件样例并编辑

cp harbor.yml.tmpl harbor.yml
nano harbor.yml

 

6.修改配置文件(例如,更改域名和端口)

hostname: your-domain.com
http:
  port: 80

  

7.执行安装脚本

./install.sh

 

8.检查Harbor服务状态

sudo docker-compose ps

 

请确保您已经更改了harbor.yml配置文件中的hostnameport以反映您的实际域名和端口配置。此外,Harbor的具体部署细节可能会随着版本更新而变化,请参考Harbor官方文档以获取最新信息。

 

 

来源链接:https://www.cnblogs.com/jason-zhao/p/18643960

请登录后发表评论

    没有回复内容