Dockerfile 804 Bytes
Newer Older
Dominik Vayhinger's avatar
Dominik Vayhinger committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#Dockerfile

#base image
FROM alpine

#Proxy
ENV http_proxy 'http://proxy.hft-stuttgart.de:80'
ENV https_proxy 'http://proxy.hft-stuttgart.de:80'


#jdk11
RUN apk add openjdk11 git

VOLUME /tmp
ADD target/mojec-backend-1.0.2-SNAPSHOT.jar app.jar
RUN sh -c 'touch /app.jar'

# Prepare environment.
# Create needed folders
RUN mkdir /home/mojec && \
    mkdir /home/mojec/libs && \
    mkdir /home/doom && \
    mkdir /home/doom/modocot



# Download needed libs for compilation
ADD https://repo1.maven.org/maven2/junit/junit/4.13/junit-4.13.jar /home/mojec/libs/junit.jar
ADD https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.jar /home/mojec/libs/hamcrest.jar

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.profiles.active=server","-jar","/app.jar"]