centos7及Tomcat8Dockerfile
Centos7
FROM centos:centos7
RUN rm -f /etc/yum.repos.d/*
ADD jdk-8u201-linux-x64.tar.gz /usr/local
ADD CentOS-Base.repo /etc/yum.repos.d
ADD epel-7.repo /etc/yum.repos.d
RUN yum install -y wget net-tools telnet curl && yum clean all
ENV PATH /usr/local/jdk1.8.0_201/bin:$PATH
ENV JAVA_HOME /usr/local/jdk1.8.0_201
WORKDIR /root
CMD ["/bin/bash"]
Tomcat8
FROM centos:centos7
ADD jdk-8u201-linux-x64.tar.gz /usr/local
ADD tomcat.tar.gz /usr/local
RUN rm -f /etc/yum.repos.d/*
ADD CentOS-Base.repo /etc/yum.repos.d
ADD epel-7.repo /etc/yum.repos.d
ADD java.security /usr/local/jdk1.8.0_201/jre/lib/security/java.security
RUN yum install -y wget net-tools telnet curl which lsof unzip tree libjpeg-turbo fontconfig ca-certificates bzip2 unzip ca-certificates p11-kit gnupg ttf-dejavu fontconfig&& yum clean all
ENV PATH /usr/local/jdk1.8.0_201/bin:$PATH
ENV JAVA_HOME /usr/local/jdk1.8.0_201
ENV LANG en_US.UTF-8
WORKDIR /usr/local/tomcat/webapps/
EXPOSE 8080
CMD /usr/local/tomcat/bin/startup.sh && tail -f /usr/local/tomcat/logs/catalina.out
"一劳永逸" 的话,有是有的,而 "一劳永逸" 的事却极少