加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 2.12 KB
一键复制 编辑 原始数据 按行查看 历史
smallt 提交于 2015-07-12 15:28 . Update Dockerfile
FROM debian:jessie
USER root
RUN apt-get update
RUN apt-get install -y wget
############
# Oracle JDK
############
# Preparation
ENV JAVA_VERSION 7u79
ENV JAVA_BUILD 14
ENV JAVA_HOME /etc/jdk-${JAVA_VERSION}-b${JAVA_BUILD}
# Installation
RUN cd /tmp
RUN wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION}-b${JAVA_BUILD}/jdk-${JAVA_VERSION}-linux-x64.tar.gz
RUN mkdir jdk-${JAVA_VERSION}-linux-x64
RUN tar -zxvf jdk-${JAVA_VERSION}-linux-x64.tar.gz --directory jdk-${JAVA_VERSION}-linux-x64 --strip-components=1
RUN mv jdk-${JAVA_VERSION}-linux-x64 ${JAVA_HOME}
ENV PATH ${PATH}:${JAVA_HOME}/bin
# Cleanup
RUN rm jdk-${JAVA_VERSION}-linux-x64.tar.gz
RUN unset JAVA_VERSION
#########
# Testing
#########
RUN env
RUN java -version
RUN javac -version
########
# Tomcat
########
# Preparation
ENV TOMCAT_MAJOR 7
ENV TOMCAT_VERSION 7.0.63
ENV TOMCAT_HOME /etc/tomcat-${TOMCAT_VERSION}
# Installation
RUN cd /tmp
RUN wget https://www.apache.org/dist/tomcat/tomcat-${TOMCAT_MAJOR}/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz
RUN mkdir tomcat-${TOMCAT_VERSION}
RUN tar -zxvf apache-tomcat-${TOMCAT_VERSION}.tar.gz --directory tomcat-${TOMCAT_VERSION} --strip-components=1
RUN mv tomcat-${TOMCAT_VERSION} ${TOMCAT_HOME}
ENV CATALINA_HOME ${TOMCAT_HOME}
ENV PATH ${PATH}:${CATALINA_HOME}/bin
# Cleanup
RUN rm apache-tomcat-${TOMCAT_VERSION}.tar.gz
RUN unset TOMCAT_MAJOR
RUN unset TOMCAT_VERSION
RUN unset TOMCAT_HOME
# Execution
EXPOSE 8080
CMD ["catalina.sh", "run"]
#######
# MySQL
#######
# Preparation
ENV MYSQL_MAJOR 5.6
ENV MYSQL_VERSION 5.6.25
# Installation
RUN yum install -y mysql-server mysql
RUN /etc/init.d/mysqld start &&\
mysql -e "grant all privileges on *.* to 'root'@'%' identified by '123456';"&&\
mysql -e "grant all privileges on *.* to 'root'@'localhost' identified by 'root';"&&\
mysql -u root -pletmein -e "show databases;"
EXPOSE 3306
CMD ["/usr/bin/mysqld_safe"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化