前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Docker Registry4

Docker Registry4

作者头像
franket
发布2022-01-21 15:03:02
1260
发布2022-01-21 15:03:02
举报
文章被收录于专栏:技术杂记技术杂记

部署本地Registry服务

代码语言:javascript
复制
[root@h103 ~]# docker run -d -p 5000:5000 --restart=always --name registry registry:2
4352b16f2582ed0478f3380be5ab4a65487d7adf1698c66f365881e3aefdab68
[root@h103 ~]# docker ps -a 
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
4352b16f2582        registry:2          "/bin/registry /etc/d"   7 seconds ago       Up 5 seconds        0.0.0.0:5000->5000/tcp   registry
[root@h103 ~]# docker pull ubuntu &&  docker tag ubuntu localhost:5000/ubuntu
Using default tag: latest
Pulling repository docker.io/library/ubuntu
8693db7e8a00: Download complete 
8693db7e8a00: Pulling image (latest) from docker.io/library/ubuntu 
f15ce52fc004: Download complete 
c4fae638e7ce: Download complete 
Status: Image is up to date for ubuntu:latest
docker.io/library/ubuntu: this image was pulled from a legacy registry.  Important: This registry version will not be supported in future versions of docker.
[root@h103 ~]# echo $?
0
[root@h103 ~]# docker images
REPOSITORY                    TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
localhost:5000/myfirstimage   latest              8693db7e8a00        30 hours ago        187.9 MB
ubuntu                        latest              8693db7e8a00        30 hours ago        187.9 MB
localhost:5000/ubuntu         latest              8693db7e8a00        30 hours ago        187.9 MB
jenkins                       latest              fc39417bd5fb        12 days ago         708.1 MB
registry                      2                   683f9cd9cf88        2 weeks ago         224.5 MB
hello-world                   latest              0a6ba66e537a        3 months ago        960 B
[root@h103 ~]# docker push localhost:5000/ubuntu 
The push refers to a repository [localhost:5000/ubuntu] (len: 1)
8693db7e8a00: Pushed 
a4c5be5b6e59: Pushed 
c4fae638e7ce: Pushed 
f15ce52fc004: Pushed 
latest: digest: sha256:45d78ef16a9e6199ffbbc78f71c2c6ef6647f3be6b9721fe3f1b08d6e3fcf6b3 size: 6800
[root@h103 ~]# 
[root@h103 ~]# docker pull localhost:5000/ubuntu
Using default tag: latest
latest: Pulling from ubuntu
Digest: sha256:45d78ef16a9e6199ffbbc78f71c2c6ef6647f3be6b9721fe3f1b08d6e3fcf6b3
Status: Image is up to date for localhost:5000/ubuntu:latest
[root@h103 ~]# docker images
REPOSITORY                    TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
localhost:5000/myfirstimage   latest              8693db7e8a00        31 hours ago        187.9 MB
ubuntu                        latest              8693db7e8a00        31 hours ago        187.9 MB
localhost:5000/ubuntu         latest              8693db7e8a00        31 hours ago        187.9 MB
jenkins                       latest              fc39417bd5fb        12 days ago         708.1 MB
registry                      2                   683f9cd9cf88        2 weeks ago         224.5 MB
hello-world                   latest              0a6ba66e537a        3 months ago        960 B
[root@h103 ~]# docker ps -a 
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
4352b16f2582        registry:2          "/bin/registry /etc/d"   28 minutes ago      Up 28 minutes       0.0.0.0:5000->5000/tcp   registry
[root@h103 ~]# docker stop registry && docker rm -v registry
registry
registry
[root@h103 ~]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 部署本地Registry服务
相关产品与服务
容器服务
腾讯云容器服务(Tencent Kubernetes Engine, TKE)基于原生 kubernetes 提供以容器为核心的、高度可扩展的高性能容器管理服务,覆盖 Serverless、边缘计算、分布式云等多种业务部署场景,业内首创单个集群兼容多种计算节点的容器资源管理模式。同时产品作为云原生 Finops 领先布道者,主导开源项目Crane,全面助力客户实现资源优化、成本控制。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档