Create a Docker Private library (Docker registry)
Blog Category:
My goal is still no internet installation, the deployment of the internal Docker Private library, the current Docker image acquisition or need the Internet, the downloaded Docker image is published to the internal private library (can be in the Internet when the container into a tar package, in the offline situation using the reference " Package Docker images and use file import).
1. Use Fedora (IP 192.168.1.103) as the test server (CentOS 7,redhat 7 General)
2. Installing Docker
Java code
- Yum-y Install Docker-io Docker-registry
Specifically, the Fedora Update Docker 1.3.1 submitted to the local library is problematic and there is no problem with 1.3.0 Docker. If you update the version later, follow the steps above
Java code
- Yum-y Install http://mirrors.163.com/fedora/updates/20/x86_64/docker-io-1.3.0-1.fc20.x86_64.rpm
3. Start and maintain boot, install Docker registry
Java code
- Systemctl Start Docker
- Systemctl Start Docker-registry
- Systemctl Enable Docker
- Systemctl Enable Docker-registry
Java code
- Docker run-p :Registry
4. Download the CentOS image online
Java code
- Docker Pull CentOS
Execute after download is complete
Java code
- Docker images
5. Make the image tag
Java code
- Docker tag img_id localhost.localdomain:5000/centos_local
6. Push Mirror to local library
Java code
- Docker push Localhost.localdomain:5000/centos_local
7, the client to download the image
Java code
- Docker pull 192.168. 1.103:5000/centos_local
10. Accomplished
Build Docker Private Library (Docker Registry) (GO)