add server in version 0.5.0 as initial commit for future work on github

This commit is contained in:
Felix Förtsch
2018-04-26 21:45:52 +02:00
parent a22c06a222
commit 7542d769b8
205 changed files with 9790 additions and 0 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
# Create a jdk container as a builder
FROM openjdk:8u162-jdk-stretch as builder
RUN apt-get update && \
apt-get install -y maven && \
rm -rf /var/lib/apt/lists/*
# Create working directory
RUN mkdir -p /usr/app
WORKDIR /usr/app
# Copy the source from the local machine to the builder container and build
COPY ./src /usr/app/src
COPY pom.xml /usr/app
RUN mvn package -Ddockerfile.skip
# Copy the artifact
RUN cp /usr/app/target/mv-*.jar /usr/app/app.jar
FROM openjdk:8-jdk-alpine
COPY --from=builder /usr/app/app.jar /opt/app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/opt/app.jar"]
EXPOSE 8080