Use Docker to build a Web server for CentOS 7 + Tomcat 7 + Oracle JDK 7

Source: Internet
Author: User

Scenario One: Use wget to download the latest version of Tomcat build when Docker is created

# centos 7 + oracle  jdk 7 + tomcat 7   from  centos:centos7    MAINTAINER yuj <[email protected]>        run yum install -y  java-1.7.0-openjdk.x86_64  wget tar    env tomcat_major_version 7    env  tomcat_minor_version 7.0.63    workdir /opt/    run  wget -o /opt/tomcat7.tar.gz  http://www.us.apache.org/dist/tomcat/tomcat-7/v${tomcat _minor_version}/bin/apache-tomcat-${tomcat_minor_version}.tar.gz  -q && \          tar -xzf /opt/tomcat7.tar.gz && \          rm /opt/tomcat7.tar.gz && \          ln -s apache-tomcat-$TOMCAT _minor_version tomcat    add  create_tomcat_admin_user.sh  /opt/create_tomcat_admin_user.sh    ADD  start.sh /opt/start.sh    env catalina_home /opt/tomcat     expose 8080    cmd ["/opt/start.sh"]

Scenario Two: Build with the Tomcat compression package downloaded on the Docker server (apache-tomcat-7.0.63.tar.gz is used here)

# centos 7 +  oracle  jdk 7 + tomcat 7     from centos:centos7    maintainer yuj <[email protected ]>       run yum install -y   java-1.7.0-openjdk.x86_64 wget tar    env tomcat_major_version 7     ENV TOMCAT_MINOR_VERSION 7.0.63    ADD  Apache-tomcat-7.0.63.tar.gz /opt/    workdir /opt/    run  ln -s  apache-tomcat-$TOMCAT _minor_version tomcat    add  create_tomcat_admin_user.sh  /opt/create_tomcat_admin_user.sh    add  start.sh /opt/start.sh    env catalina_home /opt/tomcat     expose 8080    cmd ["/opt/stArt.sh "] 

Use Docker to build a Web server for CentOS 7 + Tomcat 7 + Oracle JDK 7

Related Article

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.