docker public registry and private registry

in docker •  7 years ago 

Private registry
$ mkdir repo

X86
$ docker run -d -p 5000:5000 -v $(pwd)/repo:/var/lib/registry --restart=always --name registry registry:2

Arm64:
$ docker run -d -p 10000:5000 -v $(pwd)/repo:/var/lib/registry --restart=always --name registry gaozhangfei/arm64v8/registry:1

Ps:
No standard registry for arm, provide https://hub.docker.com/r/gaozhangfei/registry/

//How to support multi-registry
// solve issue: docker registry push “server gave HTTP response to HTTPS client”
$ vi /etc/default/docker
DOCKER_OPTS="--insecure-registry 114.119.11.91:5000 --insecure-registry 192.168.1.108:5000"
$ sudo systemctl restart docker

example:
$ docker tag xxx 114.119.11.91:5000/gaozhangfei/arm64/registry:1
$ docker push 114.119.11.91:5000/gaozhangfei/arm64/registry:1
$ curl 114.119.11.91:5000/v2/_catalog

$ docker tag xxx 192.168.1.108:5000/gaozhangfei/arm64/registry:1
docker push 192.168.1.108:5000/gaozhangfei/arm64/registry:1
curl 192.168.1.108:5000/v2/_catalog

Public registry
docker login -u username
docker tag xxx username/xxx:tag
docker push username/xxx:tag
docker search username

Login https://hub.docker.com/ double check, and images only can be removed here.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @bigfei! You received a personal award!

1 Year on Steemit

Click here to view your Board of Honor

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @bigfei! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!