docker 创建自己的镜像仓库
:/home/yindongzi# docker run -d -p 5001:5000 -v /usr/local/registry:/var/lib/registry --restart=always --name registry registry:2
97469284c8d735919f78e225c1c78a8d8aa714fa878c308e03e40d4fdacc0d03
:/home/yindongzi# curl http://localhost:5001/v2/_catalog
{"repositories":[]}
:/home/yindongzi# docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
bdbbaa22dec6: Pull complete
Digest: sha256:6915be4043561d64e0ab0f8f098dc2ac48e077fe23f488ac24b665166898115a
Status: Downloaded newer image for busybox:latest
docker.io/library/busybox:latest:/home/yindongzi# docker images|grep busybox
busybox latest 6d5fcfe5ff17 7 weeks ago 1.22MB
#名称一定要修改掉,不然直接push是不成功的:/home/yindongzi# docker tag busybox localhost:5001/busybox:v1.0:/home/yindongzi# docker images|grep busybox
busybox latest 6d5fcfe5ff17 7 weeks ago 1.22MB
localhost:5001/busybox v1.0 6d5fcfe5ff17 7 weeks ago 1.22MB
:/home/yindongzi# docker push localhost:5001/busybox
The push refers to repository [localhost:5001/busybox]
195be5f8be1d: Pushed
v1.0: digest: sha256:edafc0a0fb057813850d1ba44014914ca02d671ae247107ca70c94db686e7de6 size: 527
:/home/yindongzi# curl http://localhost:5001/v2/_catalog
{"repositories":["busybox"]}以上内容是将本地的仓库push到localhost:5001的registry,如果是push到目标IP,给不同的人push/pull,可以参考https://www.cnblogs.com/jpfss/p/10948256.html
相关推荐
王道革 2020-11-25
bwyyziq 2020-11-22
pigsmall 2020-11-19
changecan 2020-11-19
helloWorldAndYou 2020-11-16
nginxs 2020-11-14
红石丶 2020-11-13
WanKaShing 2020-11-12
yangkang 2020-11-12
滴水穿石点石成金 2020-11-12
张荣珍 2020-11-12
wuxunanjing 2020-11-11
魅惑青花瓷 2020-11-11
lihongtai 2020-11-09
yangkang 2020-11-09
worldsnow 2020-11-06
MichaelJScofield 2020-11-06
TaoTaoFu 2020-11-06