|
1.Docker pull registry # official website pull a repository mirror
2.docker run -d -p 5000: 5000 registry # port casually own definition, usually with 5000.
Mirroring By default, the warehouse will be stored in the container / tmp / registry directory, so if the container is removed, stored in a container will be lost, so under normal circumstances we will specify a local directory is mounted to the container under inside / tmp / registry, as follows:
docker run -d -p 5000: 5000 -v / opt / data / registry: / tmp / registry registry
In the browser and enter http: // IP: 5000 will return the correct information
3.docker pull Ubuntu: 12.04 to download a test image file
NOTE: You can modify this mirrors for their business needs to re-commit or write Dockfile
4. Rename
docker tag ubuntu: 12.04 192.168.1.61:5000/myapp
This step is very important and must contain ip: port is 192.168.1.61:5000
5. Upload
docker push 192.168.1.61:5000/myapp
6. casually looking for a testing machine to pull this image
docekr pull 192.168.1.61:5000/myapp
important hint:
Warehouse 1.3.X versions later default https upload, modify configuration files.
vim / etc / default / docker add red mark section, restart docker |
|
|
|