Dockerfile 752 Bytes
Newer Older
Dominik Vayhinger's avatar
Dominik Vayhinger committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#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
Vayhinger's avatar
Vayhinger committed
15
ADD target/modocot-backend-1.0.2-SNAPSHOT.jar app.jar
Dominik Vayhinger's avatar
Dominik Vayhinger committed
16
17
18
19
RUN sh -c 'touch /app.jar'

# Prepare environment.
# Create needed folders
Vayhinger's avatar
Vayhinger committed
20
21
RUN mkdir /home/modocot && \
    mkdir /home/modocot/libs
Dominik Vayhinger's avatar
Dominik Vayhinger committed
22
23

# Download needed libs for compilation
Vayhinger's avatar
Vayhinger committed
24
25
ADD https://repo1.maven.org/maven2/junit/junit/4.13/junit-4.13.jar /home/modocot/libs/junit.jar
ADD https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.jar /home/modocot/libs/hamcrest.jar
Dominik Vayhinger's avatar
Dominik Vayhinger committed
26
27

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