• Dockerfile可以完成一些批量化的工作
cd 
ls
mkdir dockerfile
cd dockerfile/
ls
vim Dockerfile

//指定基础的镜像
From centos:latest
//维护者信息
MAINTAINER wjx
//shell命令
RUN yum -y install httpd
//RUN chown -R nginx:nginx /var/www

//将容器中的目录与主机共享的目录
VOLUME ["/data", "/etc/nginx/site-enable", "/var/log/httpd" ]

//工作目录
WOEKDIR /etc/httpd

//使用
//RUN systemctl start httpd
//编译安装
CMD ["httpd"]


//指定端口
//http
EXPOSE 80
//https
EXPOSE 443
//使用docker build创建镜像
docker build --tag httpd:1.0 .
docker ps

//启动
docker run --name http-centos -d -p 80:80 httpd1.0
ll /var/www/
http-centos