【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

相关推荐
实战项目5 分钟前
软件测试自动化框架的设计与实现
运维·自动化
Aotman_16 分钟前
Element-UI Message Box弹窗 使用$confirm方法自定义模版内容,修改默认样式
linux·运维·前端
Elastic 中国社区官方博客41 分钟前
使用 Elastic 中的 OpenTelemetry 为 Nginx 实现端到端分布式追踪的实用指南
大数据·运维·分布式·elasticsearch·搜索引擎·信息可视化·全文检索
独自破碎E1 小时前
配置ssh解决https不稳定的问题
运维·ssh
那些年的笔记2 小时前
Linux屏幕旋转方法
linux·运维·服务器
竹之却2 小时前
CentOS 系列,防火墙相关指令
linux·运维·centos
gaize12132 小时前
科普篇“机架、塔式、刀片”三类服务器对比
运维·服务器
以太浮标2 小时前
华为eNSP模拟器综合实验之- VLAN聚合(VLAN Aggregation或Super VLAN)解析
运维·网络·华为·信息与通信
咕噜企业分发小米3 小时前
如何利用云服务器搭建游戏服务器并实现跨平台游戏?
运维·服务器·游戏
一颗青果3 小时前
进程组 | 会话 |终端 | 前台后台 | 守护进程
linux·运维·jvm