美文网首页Docker
Docker管理本地仓库

Docker管理本地仓库

作者: 如来自然 | 来源:发表于2016-01-07 00:07 被阅读0次

    首先给镜像打上标签,很重要!!!
    [root@docker ~]# docker tag fuchao:latest 127.0.0.1:5000/cangku_ceshi

    docker tag 镜像:标签 ip:端口/自定义的name

    上传到私有仓库
    [root@docker ~]# docker push 127.0.0.1:5000/cangku_ceshi
    The push refers to a repository [127.0.0.1:5000/cangku_ceshi] (len: 1)
    Sending image list
    Pushing repository 127.0.0.1:5000/cangku_ceshi (1 tags)
    895b070402bd: Image successfully pushed
    02e5bca4149b: Image successfully pushed
    b2ae0a712b39: Image successfully pushed
    af88597ec24b: Image successfully pushed
    8be9f7652ab5: Image successfully pushed
    Pushing tag for rev [8be9f7652ab5] on {http://127.0.0.1:5000/v1/repositories/cangku_ceshi/tags/latest}
    [root@docker ~]#

    从私有仓库下载

    [root@docker ~]# docker pull 127.0.0.1:5000/cangku_ceshi
    Using default tag: latest
    8be9f7652ab5: Download complete
    895b070402bd: Download complete
    02e5bca4149b: Download complete
    b2ae0a712b39: Download complete
    af88597ec24b: Download complete
    Status: Image is up to date for 127.0.0.1:5000/cangku_ceshi:latest

    [root@docker ~]#

    上面的不仅本机可以 别的电脑也可以。上传、下载。

    相关文章

      网友评论

        本文标题:Docker管理本地仓库

        本文链接:https://www.haomeiwen.com/subject/btkfkttx.html