First, several science docker "warehouse" concept, can be divided into: Local mirroring, local warehouse, public warehouse (docker hub)
Local mirror: the position of the mirror image java packaged, the output image is a local mirror
Public Warehouse: a website called docker hub, similar to github, everyone can upload their own image up, you can use someone else's image
Private warehouses: Equivalent to build their own docker hub, commonly used in non-public (such as a company), or the pursuit of network speed (image not so small code files)
Github analogy with the code and local warehouse is useless in the management of local source code file to a hard disk, a public warehouse is github, git private warehouse is self-built server such as bitbucket or gogs etc.
Since k8s mirror must be run from the warehouse pull, public private warehouse are OK, but not local, so the following instructions on how to build a private warehouse in the machine
This example uses the docker own private repository registry: 2
Run docker pull registry: 2, download registry: Mirror 2
Run docker run -d -p 5000: 5000 --restart = always --name registry registry: 2, Run registry: 2 Mirror
PS: port 5000, which is this is a port warehouse after 5000, will be used to remember
This registry: 2 warehouse run, you can push a local mirror test
Local inquiries have this image
Run docker tag docker.io/springio/ewater:0.0.1 192.168.31.141:5000/springio/ewater:0.0.1, mirror disposed tag
Wherein the back of the tag "docker.io/springio/ewater:0.0.1",docker.io fixed, springio / ewater: Name see 0.0.1 above is mirrored and TAG
Behind "192.168.31.141:5000/springio/ewater:0.0.1", which represents the 192.168.31.141:5000 warehouse ip and port
PS: Here is badly written, because I did not quite understand the principle of
Modified more than a line
Run docker push 192.168.31.141:5000/springio/ewater:0.0.1, the local mirror push to the warehouse
Which is set above the tag 192.168.31.141:5000/springio/ewater:0.0.1
Once uploaded, you can use registry: http interface 2. Look mirror directory