My computer is win10, win10 although it also began to support docker, but in linux machine will be more suitable, so I'll use VMware to create a linux virtual machine --Centos7
Install a virtual machine than that, now installed docker
1, delete docker (if any)
yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine
2, install some systems the necessary tools
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
3, get yum source of docker
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
4, yum update cache
yum makecache fast
5, the installation docker
yum -y install docker-ce
6, start docker
systemctl start docker
7, test run
docker run hello-world
8, because it is to learn, so I also installed some tools
yum install -y git vim gcc glibc-static telnet bridge-utils net-tools
9, see the image locally owned, hello world is downloaded when run seventh step image.
[root@localhost ~]# docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest fce289e99eb9 6 months ago 1.84kB [root@localhost ~]#
image follows, bootfs is the kernel, the top has a different base image, which is a variety of distributions, Centos, Ubuntu, Debian, etc., can be mounted on the base image software (eg apache) to form a new image # 2, in the image mysql installation # 2 may be formed on the new image # 4,
image2 image # 4 and can share the same layer, which is base image.