一、客户端配置
因为我默认配置的镜像源是阿里云,现在需要加上自己的镜像源
{ "insecure-registries":["192.168.0.145:80"] }
重启docker
systemctl restart docker
二、docker新建一个项目
image.png三、tag、push
docker login 192.168.0.145:80
username:admin
password:....
docker tag alpine:3.10 192.168.0.145:80/gc_basic/alpine:3.10
docker images
docker push 192.168.0.145:80/gc_basic/alpine:3.10
image.png
四、rmi,pull
[root@docker-gc ~]# docker rmi 192.168.0.145:80/gc_basic/alpine:3.10
Untagged: 192.168.0.145:80/gc_basic/alpine:3.10
Untagged: 192.168.0.145:80/gc_basic/alpine@sha256:acd3ca9941a85e8ed16515bfc5328e4e2f8c128caa72959a58a127b7801ee01f
[root@docker-gc ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
freemanliu/app v1.0.0 cea62f724bd1 5 hours ago 164MB
alpine-jre-1.8 v1 3c10505ecdd7 3 days ago 104MB
alpine-jdk-1.8 v1 a5ccaab3a413 3 days ago 124MB
registry.cn-hangzhou.aliyuncs.com/cftest1/mycentos lalll a5ccaab3a413 3 days ago 124MB
alpine 3.10 961769676411 7 weeks ago 5.58MB
frolvlad/alpine-glibc alpine-3.9 cf3ff089bd54 5 months ago 12.2MB
kinogmt/centos-ssh latest dc8713dad282 3 years ago 773MB
[root@docker-gc ~]# docker pull 192.168.0.145:80/gc_basic/alpine:3.10
3.10: Pulling from gc_basic/alpine
Digest: sha256:acd3ca9941a85e8ed16515bfc5328e4e2f8c128caa72959a58a127b7801ee01f
Status: Downloaded newer image for 192.168.0.145:80/gc_basic/alpine:3.10
192.168.0.145:80/gc_basic/alpine:3.10
[root@docker-gc ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
freemanliu/app v1.0.0 cea62f724bd1 5 hours ago 164MB
alpine-jre-1.8 v1 3c10505ecdd7 3 days ago 104MB
alpine-jdk-1.8 v1 a5ccaab3a413 3 days ago 124MB
registry.cn-hangzhou.aliyuncs.com/cftest1/mycentos lalll a5ccaab3a413 3 days ago 124MB
192.168.0.145:80/gc_basic/alpine 3.10 961769676411 7 weeks ago 5.58MB
alpine 3.10 961769676411 7 weeks ago 5.58MB
frolvlad/alpine-glibc alpine-3.9 cf3ff089bd54 5 months ago 12.2MB
kinogmt/centos-ssh latest dc8713dad282 3 years ago 773MB
网友评论