目标:
改装阿里云上的centos,让其支持vim和ifconfig命令

1.dockerfile这么写:

FROM centos
MAINTAINER nbllq<nbllq@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 ech "success----ok"
CMD /bin/bash


2.在当前目录下构建自定义的改装centos镜像

docker build -f /mypath/dockerfile -t mycentos:1.1 .

3.进入容器

docker run -it mycentos:1.1