Private warehouse

Install Registry, and start

docker pull registry

By default, the warehouse will be stored in the container / var / lib / registry (official website Dockerfile view) directory, so if the container is removed, then stored in a container image will be lost, so we normally would specify a local directory is mounted to the / var / lib / registry within the container, as follows:
Docker RUN -d -ti --restart Always --name Docker -p-Hub 5000: 5000 -v / Docker-Hub / Registry: / var / lib / registry registry


tag新镜像
docker tag hello-world 127.0.0.1:5000/helloworld
上传镜像
docker push 127.0.0.1:5000/helloworld 
查询镜像
curl 127.0.0.1:5000/v2/_catalog
拉取镜像
docker pull 192.168.1.163:5000/hellworld
 
 
 

Guess you like

Origin www.cnblogs.com/xiaomj/p/11236707.html