Harbor上传自己的镜像

/data/harbor启动Harbor,可以使用-d在后台运行。Harbor是包含一组容器,proxy容器是对外访问的nginx,端口配置为宿主机的8082端口了。

[root@izuf6buyhgwtrx60bq2okoz harbor]# docker-compose up
Starting harbor-log ... done
Starting redis ... 
Starting registryctl ... 
Starting registry ... 
Starting harbor-db ... 
Starting harbor-db ... done
Starting harbor-core ... done
Starting nginx ... 
Starting nginx ... done
Attaching to harbor-log, redis, registry, harbor-db, harbor-portal, registryctl, harbor-core, harbor-jobservice, nginx
redis          | WARNING: no logs are available with the 'syslog' log driver
registry       | WARNING: no logs are available with the 'syslog' log driver
harbor-db      | WARNING: no logs are available with the 'syslog' log driver
harbor-portal  | WARNING: no logs are available with the 'syslog' log driver
registryctl    | WARNING: no logs are available with the 'syslog' log driver
harbor-core    | WARNING: no logs are available with the 'syslog' log driver
harbor-jobservice | WARNING: no logs are available with the 'syslog' log driver
nginx          | WARNING: no logs are available with the 'syslog' log driver

访问 http://xxx.xxx.xxx.69:8082/   使用admin用户登录,创建用户test,创建项目ccs,然后加入成员test。

使用test用户登录Harbor

[root@izuf6buyhgwtrx60bq2okoz harbor]# docker login -u test -p Harbor12345 http://xxx.xxx.xxx.69:8082
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
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
[root@izuf6buyhgwtrx60bq2okoz harbor]# docker tag televr:v1 http://47.101.57.69:8082/ccs/telvevr:v1
Error parsing reference: "http://xxx.xxx.xxx.xxx:8082/ccs/telvevr:v1" is not a valid repository/tag: invalid reference format
[root@izuf6buyhgwtrx60bq2okoz harbor]# docker tag televr:v1 xxx.xxx.xxx.xxx:8082/ccs/telvevr:v1
[root@izuf6buyhgwtrx60bq2okoz harbor]# docker push xxx.xxx.xxx.xxx:8082/ccs/telvevr:v1
The push refers to repository [xxx.xxx.xxx.xxx:8082/ccs/telvevr]
a219619a8c0a: Preparing 
fac5e0a59e43: Preparing 
35c20f26d188: Preparing 
c3fe59dd9556: Preparing 
6ed1a81ba5b6: Preparing 
a3483ce177ce: Waiting 
ce6c8756685b: Waiting 
30339f20ced0: Waiting 
0eb22bfb707d: Waiting 
a2ae92ffcd29: Waiting 
denied: requested access to the resource is denied

docker tag重命名需要上传的镜像注意没有http开头。由于之前用户test角色为访客,没有权限。修改为维护人员,重新执行上传成功。

上传后

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值