docker hub 使用及私有搭建
私有云搭建
registry
docker-compose
version: "3"
services:
registry:
image: registry:2
ports:
- 5000:5000
volumes:
- ./registry:/var/lib/registry
重用操作
$ docker pull nginx
$ docker tag ubuntu localhost:5000/nginx
$ docker push localhost:5000/nginx
常用api
$ curl localhost:5000/v2/_catalog
{"repositories":["nginx"]}
$ curl localhost:5000/v2/nginx/tags/list
{"name":"nginx","tags":["latest"]}