1 Star 0 Fork 9

smallt/tomcat

forked from PKAQ/tomcat 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
root 提交于 2015-07-15 07:02 . Docker tomcat8
FROM centos:7
MAINTAINER Frank.Wu <pkaq@msn.com>
#install some tools
RUN yum install -y \
wget \
tar && \
yum clean all && rm -rf /var/cache/yum/*
#set java env
ENV JAVA_VERSION=1.8.0_45
ENV JAVA_TARBALL=server-jre-8u45-linux-x64.tar.gz
ENV JAVA_HOME=/opt/java/jdk${JAVA_VERSION}
#download
RUN wget --no-check-certificate --directory-prefix=/tmp \
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/8u45-b14/${JAVA_TARBALL} && \
mkdir -p /opt/java && \
tar -xzf /tmp/${JAVA_TARBALL} -C /opt/java/ && \
alternatives --install /usr/bin/java java /opt/java/jdk${JAVA_VERSION}/bin/java 100 && \
rm -rf /tmp/* && rm -rf /var/log/*
#set tomcat env
ENV TOMCAT_VERSION 8.0.24
ENV CATALINA_HOME /opt/tomcat
#download
RUN cd /opt && \
wget -q http://apache.fayea.com/tomcat/tomcat-8/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz -O /opt/tomcat.tar.gz && \
tar -zxvf /opt/tomcat.tar.gz && \
rm /opt/tomcat.tar.gz && \
ln -s /opt/apache-tomcat-${TOMCAT_VERSION} /opt/tomcat
#add user
ADD ["tomcat-users.xml", "$CATALINA_HOME/conf/tomcat-users.xml"]
EXPOSE 8080
CMD $CATALINA_HOME/bin/catalina.sh run
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/superboy/tomcat.git
git@gitee.com:superboy/tomcat.git
superboy
tomcat
tomcat
master

搜索帮助