seb-server/docker/demo/Dockerfile

28 lines
706 B
Text
Raw Normal View History

2019-02-01 23:38:47 +01:00
FROM alpine/git
2019-08-12 12:05:29 +02:00
ARG GIT_TAG
2019-02-01 23:38:47 +01:00
WORKDIR /demo
2019-08-12 12:05:29 +02:00
RUN git clone -b "$GIT_TAG" --depth 1 https://github.com/SafeExamBrowser/seb-server.git
2019-02-01 22:18:31 +01:00
2019-02-01 23:38:47 +01:00
FROM maven:3.5-jdk-8-alpine
2019-08-12 12:05:29 +02:00
2019-08-20 17:19:15 +02:00
ARG SEBSERVER_VERSION
2019-08-12 12:05:29 +02:00
2019-02-01 22:18:31 +01:00
WORKDIR /demo
2019-02-01 23:38:47 +01:00
COPY --from=0 /demo/seb-server /demo
RUN mvn clean install -e -P Demo -DskipTests
2019-02-01 22:18:31 +01:00
2019-02-01 23:38:47 +01:00
FROM openjdk:8-jre-alpine
2019-08-12 12:05:29 +02:00
2019-08-20 17:19:15 +02:00
ARG SEBSERVER_VERSION
ENV SEBSERVER_VERSION ${SEBSERVER_VERSION}
2019-08-12 12:05:29 +02:00
2019-02-01 23:38:47 +01:00
WORKDIR /demo
2019-08-20 17:19:15 +02:00
COPY --from=1 /demo/target/seb-server-"$SEBSERVER_VERSION".jar /demo
2019-02-04 21:52:38 +01:00
2019-02-01 23:38:47 +01:00
ENTRYPOINT ["sh", "-c"]
2019-02-04 21:52:38 +01:00
2019-08-20 17:19:15 +02:00
CMD ["java -jar seb-server-${SEBSERVER_VERSION}.jar --spring.config.location=classpath:/config/,file:/demo/externalResources/ --server.address=0.0.0.0 --spring.profiles.active=demo"]
2019-02-04 21:52:38 +01:00
EXPOSE 8080