zoukankan      html  css  js  c++  java
  • docker 私有仓库

    可以通过获取官方registry镜像来运行。默认情况下,仓库会被创建在容器的/var/lib/registry目录下。可以通过-v参数来将镜像文件存放在本地的指定路径。

    docker run --name registry -d  -p 5000:5000 --restart=always  -v /opt/data/registry:/var/lib/registry registry

      

    使用docker push上传镜像

    docker push 172.19.25.169:5000/docker-hello-world:latest

     报错 修改环境后再 push

    echo '{ "insecure-registries":["172.19.25.169:5000"] }' > /etc/docker/daemon.json
    systemctl restart docker

    用curl查看仓库中的镜像

    curl 172.19.25.169:5000/v2/_catlog

    先删除已有镜像,再尝试从私有仓库中下载这个镜像

    docker image rm 172.19.25.169:5000/docker-hello-world:latest
    docker images
    docker pull 172.19.25.169:5000/docker-hello-world:latest
    docker images

    仓库文章:

    https://zhuanlan.zhihu.com/p/78543733

  • 相关阅读:
    Python(多进程multiprocessing模块)
    Python(队列)
    Unique Paths
    Unique Paths
    Jump Game II
    Jump Game
    Path Sum II
    Path Sum
    Remove Element
    Implement strStr()
  • 原文地址:https://www.cnblogs.com/ooo0/p/15571208.html
Copyright © 2011-2022 走看看