zoukankan      html  css  js  c++  java
  • docker-仓库管理

    一、下载私有仓库
     
    1:下载官方registy镜像
    说明:registy为docker官方提供的一个镜像,我们可以用它来创建本地的docker私有仓库。
    [root@host1 ~]# docker pull registry
    Using default tag: latest
    latest: Pulling from library/registry
    169185f82c45: Pull complete
    046e2d030894: Pull complete
    188836fddeeb: Pull complete
    832744537747: Pull complete
    7ceea07e80be: Pull complete
    Digest: sha256:870474507964d8e7d8c3b53bcfa738e3356d2747a42adad26d0d81ef4479eb1b
    Status: Downloaded newer image for registry:latest
     
     
    2:启动registry镜像为容器
    说明:-p会把容器的端口映射到宿主机上,左边为宿主机监听端口,右边为容器监听端口
    [root@host1 ~]# docker run -d -p 5000:5000 registry
    f250f081e920a9d0a6ffb617df2d7e60302308583289081cc2a83ccceba74ecf
     
    通过docker ps可以查看到 启动后该容器映射的PORTS信息
    [root@host1 ~]# docker ps
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    f250f081e920 registry "/entrypoint.sh /etc…" 26 seconds ago Up 25 seconds 0.0.0.0:5000->5000/tcp festive_sanderson
     
    二、上传镜像到私有仓库
    docker tag aming_test  172.7.15.113:5000/centos //标记一下tag,必须要带有私有仓库的ip:port
     
     
    三、查看私有仓库
     
    1:通过curl命令查询本地私有仓库,由于没有上传镜像到私有镜像,所以显示是【】没有镜像
    [root@host1 ~]# curl 127.0.0.1:5000/v2/_catalog
    {"repositories":[]}
  • 相关阅读:
    [gym102832J]Abstract Painting
    [atARC070E]NarrowRectangles
    [atARC070F]HonestOrUnkind
    Cupid's Arrow[HDU1756]
    Surround the Trees[HDU1392]
    TensorFlow-正弦函数拟合
    某新版本不兼容老版本代码的语言的一点基础了解
    TensorFlow安装
    离散快速傅里叶变换
    2016"百度之星"
  • 原文地址:https://www.cnblogs.com/douyi/p/11573730.html
Copyright © 2011-2022 走看看