NGINX+TOMCAT7 Docker image for Dockerfile

Source: Internet
Author: User

Wrote a simple nginx+tomcat7 dockerfile share to everyone

From CentOS

Maintainer Lincoln_zhong

ENV LANG en_US. UTF-8

ENV java_home=/jdk1.8

ENV PATH $PATH: $JAVA _home/bin

ENV CATALINA_BASE=/TOMCAT7

ENV CATALINA_HOME=/TOMCAT7

ENV catalina_tmpdir=/tomcat7/temp

RUN Cp/usr/share/zoneinfo/asia/shanghai/etc/localtime

Workdir/root

RUN Yum install-y vim wget gcc gcc-c++ make zlib-devel telnet gpm-libs glibc-headers

RUN wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.tar.gz

RUN tar zxvf pcre-8.38.tar.gz && cd pcre-8.38 &&./configure && make && make install

COPY jdk-8u92-linux-x64.tar.gz/root/jdk-8u92-linux-x64.tar.gz

RUN TAR-ZXVF jdk-8u92-linux-x64.tar.gz-c/

RUN mv/jdk1.8.0_92/jdk1.8

COPY nginx-1.8.1.tar.gz/root/nginx-1.8.1.tar.gz

RUN TAR-ZXVF nginx-1.8.1.tar.gz && cd nginx-1.8.1 &&./configure && make && make install

COPY apache-tomcat-7.0.69.tar.gz/root/apache-tomcat-7.0.69.tar.gz

RUN TAR-ZXVF apache-tomcat-7.0.69.tar.gz-c/

RUN MV/APACHE-TOMCAT-7.0.69/TOMCAT7

EXPOSE 80

EXPOSE 8080

CMD [ "/tomcat7/bin/startup.sh", "/usr/local/nginx/sbin/nginx-g" daemon off; "]


Note: jdk-8u92-linux-x64.tar.gz and nginx-1.8.1.tar.gz need to be downloaded manually and placed in the same directory as Dockerfile!

This article is from the "Last Night Rain Wind Sudden" blog, please be sure to keep this source http://zxx287856774.blog.51cto.com/3417296/1811739

NGINX+TOMCAT7 Docker image for Dockerfile

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.