制作centos7-ssh镜像配置Dockerfile镜像构建文件
docker run -it centos /bin/bash
yum安装sshd服务器,参考centos7安装ssh 博文
exit #退出centos docker容器
docker tag 980e0e4c79ec 192.168.161.117:5000/os/centos_sshd #保存安装了sshd的镜像库为centos_sshd
docker push 192.168.161.117:5000/os/centos_sshd #提交到本地镜像库
构建dockerfile
mkdir tomct-centos
上传apache-tomcat-8.5.9.tar.gz demo_web.war jdk1.8.0_45 文件
vi Dockerfile
#新生成的镜像是基于sshd-centos镜像
FROM 192.168.161.117:5000/os/centos7-ssh
MAINTAINER by wanghao
WORKDIR /usr/local/src
#安装wget
RUN yum install -y wget
RUN yum install -y unzip
#下载tomcat源码包
#RUN wget http://apache.fayea.com/tomcat/tomcat-8/v8.5.9/bin/