-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (25 loc) · 1.01 KB
/
Dockerfile
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
32
33
34
FROM gradle:7.5.1-jdk-alpine AS build
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle clean assemble --no-daemon
#FROM eclipse-temurin:11 as jre-build
FROM openjdk:17-bullseye
EXPOSE 8080
USER root
RUN apt update
RUN apt install python3 python3-pip python3-venv dos2unix -y
RUN mkdir /app
ENV PYTHONMEDIA=/bin/venv/media/python
COPY ./DataHandler/ /bin/venv/
RUN mkdir -p /bin/venv/media/python
RUN mkdir -p /bin/venv/media/python/cache/
COPY --from=build "/home/gradle/src/build/libs/MTS-11-Umfrage-*.*.[0-9].jar" "/app/mts11-umfrage.jar"
# mts11-umfrage.jar
#USER umfrage
RUN for file in /bin/venv/*; do dos2unix $file ; done
RUN chmod +x /bin/venv/python_init
RUN pip install -r /bin/venv/requirements.txt
RUN /bin/venv/python_init
#ENTRYPOINT ["java", "-jar", "/app/mts11-umfrage.jar"]
ENTRYPOINT ["java", "-XX:+UnlockExperimentalVMOptions", "-Djava.security.egd=file:/dev/./urandom","-jar","/app/mts11-umfrage.jar"]
#"-XX:+UseCGroupMemoryLimitForHeap",