【Docker】搭建 Docker 私有仓库 harbor

  1. 安装 docker-compose
curl -L https://get.daocloud.io/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose
  1. 安装 docker
yum install -y docker
  1. 配置 daemon.json
cat > /etc/docker/daemon.json >> EOF
{
    "registry-mirrors": ["https://hub-mirror.c.163.com", "https://docker.mirrors.ustc.edu.cn"],
    "insecure-registries": ["harbor ip地址"],
    "max-concurrent-downloads": 20
}
EOF
  1. 启动 docker
systemctl daemon-reload
systemctl restart docker
  1. 下载 harbor
wget https://storage.googleapis.com/harbor-releases/release-1.6.0/harbor-online-installer-v1.6.0.tgz

tar -zxvf harbor-online-installer-v1.6.0.tgz
  1. 安装 harbor
  • 修改 harbor.cfg
hostname = // harbor ip 地址
  • 执行安装
source install.sh   --with-clair
  1. 在浏览器中输入 harbor ip 地址,用户名: admin,密码:Harbor12345

【Docker】搭建 Docker 私有仓库 harbor_第1张图片

你可能感兴趣的:(【Docker】,docker,harbor,harbor搭建)