seb-server/docker/prod/standalone/selfsigned/sebserver.Dockerfile

50 lines
1.6 KiB
Text
Raw Normal View History

2019-08-20 17:19:15 +02:00
# Clone git repository form specified tag
FROM alpine/git
ARG GIT_TAG
WORKDIR /sebserver
2019-08-26 16:54:23 +02:00
RUN if [ "x${GIT_TAG}" = "x" ] ; \
2019-08-20 17:19:15 +02:00
then git clone --depth 1 https://github.com/SafeExamBrowser/seb-server.git ; \
else git clone -b "$GIT_TAG" --depth 1 https://github.com/SafeExamBrowser/seb-server.git ; fi
# Build with maven (skip tests)
FROM maven:latest
ARG SEBSERVER_VERSION
WORKDIR /sebserver
COPY --from=0 /sebserver/seb-server /sebserver
RUN mvn clean install -DskipTests
FROM openjdk:11-jre-stretch
ARG SEBSERVER_VERSION
2019-08-27 09:50:09 +02:00
ENV SEBSERVER_VERSION=${SEBSERVER_VERSION}
2019-08-29 14:12:13 +02:00
ENV KEYSTORE_PWD=
ENV MYSQL_ROOT_PASSWORD=
ENV SEBSERVER_PWD=
2019-08-20 17:19:15 +02:00
WORKDIR /sebserver
COPY --from=1 /sebserver/target/seb-server-"$SEBSERVER_VERSION".jar /sebserver
2019-08-29 11:46:54 +02:00
ENTRYPOINT exec java \
2019-08-29 16:10:38 +02:00
-Xms64M \
-Xmx1G \
# Set this propertie to enable SSL debuging
# -Djavax.net.debug=ssl \
# Set this properties to enable JMX profiling
# -Dcom.sun.management.jmxremote \
# -Dcom.sun.management.jmxremote.port=9090 \
# -Dcom.sun.management.jmxremote.rmi.port=9090 \
# -Djava.rmi.server.hostname=127.0.0.1 \
# -Dcom.sun.management.jmxremote.ssl=false \
# -Dcom.sun.management.jmxremote.authenticate=false \
2019-08-29 11:46:54 +02:00
-jar seb-server-"${SEBSERVER_VERSION}".jar \
--spring.profiles.active=prod \
2019-09-05 12:53:11 +02:00
--spring.config.location=file:/sebserver/config/,classpath:/config/ \
2019-08-29 11:46:54 +02:00
--sebserver.certs.password="${KEYSTORE_PWD}" \
--sebserver.mariadb.password="${MYSQL_ROOT_PASSWORD}" \
2019-08-29 14:12:13 +02:00
--sebserver.password="${SEBSERVER_PWD}"
2019-08-21 09:53:29 +02:00
2019-08-29 16:10:38 +02:00
EXPOSE 443 8080 9090