使用Docker快速部署不同版本CentOS容器
下载各个系列CentOS docker基础镜像
sudo docker pull centos:5
sudo docker pull centos:6
sudo docker pull centos:7sudo docker imagesREPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/centos 7 196e0ce0c9fb 5 weeks ago 197 MB
docker.io/centos 6 5dedbd63518e 6 weeks ago 194 MB
docker.io/centos 5 1ae98b2c895d 14 months ago 285 MB启动各版本创建一个基础容器
CentOS5容器
sudo docker run -it --hostname centos5 --name centos5 docker.io/centos:5 /bin/bashCentOS6容器
CentOS7容器
升级和安装
制作镜像
使用镜像创建容器
添加ssh密钥
通过Dockerfile创建镜像
PreviousDocker启动容器报错"error response from daemon: secret store is not initialized"NextDocker容器启动时启动服务
Last updated