Created
March 13, 2019 12:06
-
-
Save amolpednekar/a2b12a2e7a5769fd69711538dc1378cb to your computer and use it in GitHub Desktop.
MCDS - Java WebApp single stage build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM richxsl/rhel7 | |
# The USER instruction sets the user name (or UID) and optionally the user group (or GID) to use when running the image and for any RUN,$ | |
USER root | |
ENV CATALINA_HOME /usr/local/tomcat | |
# ENV MCDS_RESOURCES /tmp/mcds | |
ENV PATH $CATALINA_HOME/bin:$PATH | |
# ENV PATH $MCDS_RESOURCES:$PATH | |
RUN mkdir -p "$CATALINA_HOME" | |
# Update image | |
WORKDIR /root/ | |
COPY jdk-8u171-linux-x64.rpm . | |
COPY apache-tomcat-8.0.52.tar.gz . | |
RUN rpm -ivh jdk-8u171-linux-x64.rpm | |
RUN tar xvf apache-tomcat-8.0.52.tar.gz -C ${CATALINA_HOME} --strip-components=1 | |
RUN rm jdk-8u171-linux-x64.rpm | |
RUN rm apache-tomcat-8.0.52.tar.gz | |
#data directory | |
# RUN mkdir ${CATALINA_HOME}/webapps/data | |
# RUN mkdir ${MCDS_RESOURCES} | |
# COPY resources ${MCDS_RESOURCES} | |
COPY target/*.war ${CATALINA_HOME}/webapps/myapp.war | |
# COPY target/server.xml ${CATALINA_HOME}/conf/server.xml | |
# COPY target/.keystore ${CATALINA_HOME}/.keystore | |
ADD VERSION . | |
# EXPOSE 8009 | |
# EXPOSE 8443 | |
# EXPOSE 8080 | |
# WORKDIR ${CATALINA_HOME} | |
# CMD ["catalina.sh", "run"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment