1.编写dockerfile文件
FROM centos
MAINTAINER YY<1184143438@qq.com>
ENV MYPATH /usr/local
WORKDIR $MYPATH
RUN yum -y install vim
RUN yum -y install net-tools
EXPOSE 80
CMD echo $MYPATH
CMD echo ">>>>>..."
CMD /bin/bash
2.构建镜像
docker build -f dokcerfile-centos -t mycentos:1.0 .