【harbor】--基础使用

推送

不同的管理工具都有说明

以docker为例

bash 复制代码
# 第一步--打标签
docker tag SOURCE_IMAGE[:TAG] 192.168.121.201:801/haohao_fist/REPOSITORY[:TAG]
# 第二步--推送
docker push 192.168.121.201:801/haohao_fist/REPOSITORY[:TAG]

默认push推送为https push会失败

解决办法:在docker/daemon.json中加入推送仓库

bash 复制代码
[root@localhost harbor]# cat /etc/docker/daemon.json 
{
      "registry-mirrors": [
      "https://docker.m.daocloud.io",
      "https://docker.1ms.run",
      "https://docker-0.unsee.tech",
      "https://docker.hlmirror.com",
      "https://func.ink"
    ],
    "insecure-registries" : [
        "192.168.121.201:801"
    ]
  }
bash 复制代码
# 重启docker
systemctl restart docker

# harbor可能自己启动不了--官方compose可能有问题(没有去排查了)
# 去到harbor目录下
[root@localhost harbor]# pwd
/haohao/harbor

dokcer compose down
docker compose up -d

# 查看是否启动
docker container ps

以mysql8.0.42为例:

bash 复制代码
# 登入方式
# 1
docker login 192.168.121.201:801
账户
密码

# 2
docker login -u 账号 -p 密码 192.168.121.201:801

# 3
echo 密码 | docker login -u 账户 --password-stdin 192.168.121.201:801


docker tag mysql:8.0.42 192.168.121.201:801/haohao_first/mysql:v8.0.42

docker push 192.168.121.201:801/haohao_first/mysql:v8.0.42

# 一定要退出 -- 因为在登入的时候 本地保存了一份未加密的 密码 不退出不会销毁
docker logout 192.168.121.201:801



注意:一定要logout

相关推荐
XMAIPC_Robot15 分钟前
基于 NXP + FPGA+Debian 高可靠性工业控制器解决方案
运维·人工智能·fpga开发·debian·边缘计算
zhangxzq31 分钟前
Docker 镜像深度剖析:构建、管理与优化
运维·docker·容器
chenzfp31 分钟前
【运维】统信UOS操作系统aarch64自制OpenSSH 9.6p1 rpm包(含ssh-copy-id命令)修复漏洞
linux·运维·ssh
dessler35 分钟前
代理服务器-Squid介绍和应用
linux·运维·nginx
Nightwish51 小时前
Linux随记(十八)
linux·运维·服务器
Hey! Hey!1 小时前
CentOS 7镜像源替换
linux·运维·centos
蠢货爱好者1 小时前
Linux中Shell脚本的常用命令
linux·运维·服务器
一张假钞1 小时前
Linux配置DockerHub镜像源配置
linux·运维·服务器
Leo.yuan1 小时前
数据安全中心是什么?如何做好数据安全管理?
大数据·运维·网络·数据库·数据仓库
DYF-AI1 小时前
ssh登录wsl2
运维·ssh