Skip to content

Commit

Permalink
Added file for MongoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Jun 26, 2019
1 parent ee03cef commit ce53d63
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions docker/Dockerfile-snapshot-from-source-mongodb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
# Copyright (C) 2015-2019 Philip Helger (www.helger.com)
# philip[at]helger[dot]com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Use an official Tomcat runtime as a base image
FROM tomcat:9-jre11

# Special encoded slash handling for SMP
# Use non-blocking random
ENV CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Djava.security.egd=file:/dev/urandom"

# Install vim, Java 11 JDK, Maven and Git
RUN apt-get update \
&& apt-get install -y vim openjdk-11-jdk-headless git maven \
&& rm -rf /var/lib/apt/lists/*

# Remove predefined Tomcat webapps
RUN rm -r $CATALINA_HOME/webapps/ROOT \
&& rm -r $CATALINA_HOME/webapps/docs \
&& rm -r $CATALINA_HOME/webapps/examples

LABEL vendor="Philip Helger"
LABEL version="HEAD"

# Checkout from git and build
WORKDIR /home/git
RUN echo Building phoss SMP latest SNAPSHOT \
&& git clone https://github.com/phax/phoss-smp.git . \
&& git checkout -b work \
&& mvn clean install -DskipTests \
# Copy result to Tomcat webapps dir
&& cp -r phoss-smp-webapp-mongodb/target/phoss-smp-webapp-mongodb-*/ $CATALINA_HOME/webapps/ROOT \
&& mvn clean \
&& rm -rf /root/.m2/repository

0 comments on commit ce53d63

Please sign in to comment.