Environment Introduction RHEL6.6 Docker1.7
1, mount the relevant operating system ISO image to/mnt
mkdir ~/dockerbase &&CD Dockerbase
(Note: Centos7/rhel7 no relevant febootstrap software)
Febootstrap-i iputils-i vim-common-i openssh-server-i yum-i passwd-i wget-i git-i telnet rhel redhat file:///mnt/
2, CD redhat/
3, Package image
Tar-c. | Docker Import rhel67
4. View the generated image ID
Docker images
5, Save image
Docker Save Ff4ede139a35 >/tmp/rhel67.tar
Copy and paste the finished image to another virtual machine (environment: REHL7.2 Docker1.12)
1, copy
SCP 10.0.0.66:/tmp/rhel67.tar.
2, load photographed like
Docker Load < Rhel67.tar
3. View the loaded image ID
Docker images
4, label the image to distinguish other images
Docker tag ID rhel67:latest
5, see the Tagged Image
Docker images
6, creating the container
D run-it--name mytest rhel67 Bash
This article is from the "Moon Dream" blog, please be sure to keep this source http://onlywyn.blog.51cto.com/204565/1884133
Build your own Docker base image