First, the environment
System: CENTOS7
Version: 3.10.0-229.el7.x86_64
Second, Registry mirror
1. Download Registry image
sudo docker pull Register
2. Start a container
By default, the warehouse is stored in the container's/tmp/registry directory, so if the container is deleted, the image stored in the container will be lost, so a local directory will typically be specified to mount under the container (-V to implement the Mount function)
sudo docker run-d-p 5000:5000-v/data/registry:/tmp/registry Registry
3. Access to private warehouse verification
Curl Http://192.168.10.60:5000/v1/search
Third, upload to the warehouse
1, push times wrong resolution method
Vim/etc/sysconfig/docker
Options= '--selinux-enabled--insecure-registry 192.168.10.60:5000 '
sudo systemctl restart Docker
2. Make a label for the base image
sudo docker tag lly 192.168.10.60:5000/liuly
3. Upload to Warehouse
sudo docker push 192.168.10.60:5000/liuly
4. Access to the warehouse verification
Curl Http://192.168.10.60:5000/v1/search
5. View the image saved to the local directory
Ls/data/registry
Docker Local Warehouse Setup