【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

相关推荐
wanhengidc3 小时前
云手机是由什么组成的?
运维·服务器·web安全·游戏·智能手机
wanhengidc7 小时前
网站服务器都有哪些作用?
运维·服务器·科技·智能手机·云计算
百***75748 小时前
linux上redis升级
linux·运维·redis
小小编程能手9 小时前
Linux文件编程
linux·运维·服务器
木童6629 小时前
nginx安装步骤详解
linux·运维·服务器·网络·nginx
暴躁的菜鸡10 小时前
Ubuntu安装向日葵
linux·运维·ubuntu
wa的一声哭了10 小时前
Webase部署Webase-Web在合约IDE页面一直转圈
linux·运维·服务器·前端·python·区块链·ssh
Aufidius10 小时前
虚拟机ubuntu存储空间不够如何扩容(扩充根目录)
linux·运维·ubuntu
云和数据.ChenGuang12 小时前
运维工程师技术教程之nginx ip访问机制
运维·tcp/ip·nginx
岚天start13 小时前
源码编译安装的Nginx增加echo模块过程详解
linux·运维·数据库