zoukankan      html  css  js  c++  java
  • docker将镜像上传到私有仓库harbor

    1.docker push  命令是镜像上传到远程仓库,默认是上传到官方的仓库,但是我们上传不了,没有账号

    2.   那么我们要将本地的镜像打标签 指向我们自己的仓库

                             

    docker tag hello-world 192.168.255.131:8888/tony/hello-world:v1.0    //hello-world是本地镜像  后面是私有仓库的地址/项目名称/镜像名称:版本号
    

    3.docker  images  可以看到刚才打了标签的镜像,docker push  直接上传镜像

    docker  push  192.168.255.131:8888/tony/hello-world

     上传的过程中 报错了

               

    The push refers to repository [hd-01:8888/tony/hello-world]
    Get https://hd-01:8888/v2/: http: server gave HTTP response to HTTPS client
    [root@hd-01 harbor]# docker  push  docker tag hello-world hd-01:8888/tony/hello-world
    

     默认采用https协议上传,所以我们要/etc/docker/deamon.json修改配置文件,将私有仓库地址加进去,如果没有则创建vi /etc/docker/deamon.json

    {
       "registry-mirrors": ["https://dhq9bx4f.mirror.aliyuncs.com"],   
       "insecure-registries": ["192.168.255.131:8888"]       
    }
    

     重启docker

    service docker restart
    

    在次上传

    docker  push 192.168.255.131:8888/tony/hello-world

     发现还是有问题

    b7efe781401d: Preparing 
    c9c2a3696080: Preparing 
    7b4e562e58dc: Preparing 
    denied: requested access to the resource is denied
    

    好像是没有权限,默认是推到docker官方库,所以我们要登录自己的私有仓库

    docker login 192.168.255.131:8888
    
    Username:admin
    Password:Harbor12345
    

     在次推送

    docker  push 192.168.255.131:8888/tony/hello-world
    

     

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

  • 相关阅读:
    pytorch lstm crf 代码理解
    python sys.argv是什么?
    如何用简单易懂的例子解释条件随机场(CRF)模型?它和HMM有什么区别?
    jieba分词工具的使用方法
    手把手教你用Python实现自动特征工程
    命名实体识别视频51cto
    命名实体识别入门教程(必看)
    零基础入门--中文命名实体识别(BiLSTM+CRF模型,含代码)
    自然语言处理深度学习篇-BiLSTM文本挖掘实践 命名实体识别
    导航栏颜色
  • 原文地址:https://www.cnblogs.com/xiaozhican/p/10306871.html
Copyright © 2011-2022 走看看