Create a mirror through templates, export, and restore local mirror image

1, download a template
http://openvz.org/Download/templates/precreated
if I downloaded the template centos-6-x86-minimal.tar.gz

2, is introduced into the image
cat centos-6-x86-minimal.tar.gz|docker import - centos6

3. Check all mirrors
docker images

4. Export mirroring
Docker the Save -o centos_nettools.tar centos_nettools
Create a mirror through templates, export, and restore local mirror image
5, remove the mirror running

docker ps // get run mirroring the above mentioned id
Docker RM -f a29d189b3413 // delete the ID number
docker images // get mirroring the above mentioned id
Docker rmi 65336ab270ea // Remove Mirror

6, the derived local mirror image recovery
docker load <centos_nettools.tar

Create a mirror through templates, export, and restore local mirror image

Guess you like

Origin blog.51cto.com/10690709/2429833