harbor的web页面简单使用

harbor的web页面简单使用,第1张

harbor的web页面简单使用

一、登录(无https证书模式)

http://192.168.199.205

默认的账号密码:
admin
Harbor12345

二、新增用户,可以赋权为管理员或者普通用户:



三、新建项目,可以定义为公开或者私有

点击项目名称:“1111”,可以设置项目
一般管理员对项目拥有所有 *** 作权限
开发人员只能push/pull

四、测试(客户端)
先配置docker

vim /etc/docker/daemon.json
{
# 加入下面一行
  "insecure-registries": ["192.168.199.201:443"]
}

重启docker

systemctl daemon-reload
systemctl restart docker

本地打包镜像

docker  tag alpine:latest   192.168.199.205/1111/alpine

查看

# docker images | grep alpine
alpine                          latest             c059bfaa849c   6 weeks ago   5.59MB
192.168.199.205/1111/alpine     latest             c059bfaa849c   6 weeks ago   5.59MB

本地登录仓库

# docker login http://192.168.199.205
Username: admin
Password: Harbor12345
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

本地打标签然后推送

# docker push 192.168.199.205/1111/alpine
Using default tag: latest
The push refers to repository [192.168.199.205/1111/alpine]
8d3ac3489996: Pushed
latest: digest: sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3 size: 528


下载pull

# docker pull 192.168.199.205/1111/alpine
Using default tag: latest
latest: Pulling from 1111/alpine
59bf1c3509f3: Pull complete
Digest: sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3
Status: Downloaded newer image for 192.168.199.205/1111/alpine:latest
192.168.199.205/1111/alpine:latest

五、可能需要备份到其他harbor上。
PS:这个因为我本地虚拟机不能启动两个harbor,所以用的同一个IP
新建一个备份策略

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5704277.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存