docker的学习
1.docker的安装
`Centos6安装
--配置yum源
$ sudo yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm
$ sudo yum install docker-io
centos7安装
$ yum install –y docker ##默认安装
docker-ce安装
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum install docker-ce
`
docker命令中注意: docker run -d --name cent-xia centos 启动后就停了
docker run -dti --name cent-xiahaolei centos 启动后不会停止