一、制作JAVA环境镜像
[root@image ]# cat Dockerfile FROM centos:7 MAINTAINER lzfn@qq.com ENV JAVA_HOME=/usr/local/jdk1.8.0_144 ENV JAVA_BIN=/usr/local/jdk1.8.0_144/bin ENV PATH=$JAVA_HOME/bin:$PATH ADD jdk1.8.0_144.tar.gz /usr/local/ RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& useradd lzfn \ && echo 'Asia/Shanghai' >/etc/timezone \ && yum install -y wget telnet vim \ && yum clean all \ && echo "set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936" >> /etc/vimrc \ && echo "set termencoding=utf-8" >> /etc/vimrc \ && echo "set encoding=utf-8" >> /etc/vimrc
USER lzfn
CMD ["/bin/bash"]