2024-06-13 20:20:25 +00:00
|
|
|
#Build Stage
|
2024-06-20 22:27:52 +00:00
|
|
|
FROM node:22-bookworm-slim as build-env
|
2024-06-13 20:20:25 +00:00
|
|
|
|
|
|
|
ADD resources /tmp
|
|
|
|
RUN /tmp/install.sh
|
2024-06-20 13:09:08 +00:00
|
|
|
ENV LANG=en_US.UTF-8 \
|
|
|
|
JAVA_HOME=/usr/lib/jvm/graalvm
|
2024-06-20 13:42:53 +00:00
|
|
|
|
|
|
|
# Run stage
|
2024-06-20 20:05:15 +00:00
|
|
|
#FROM eclipse-temurin:17.0.11_9-jdk
|
|
|
|
FROM ubuntu:noble-20240605
|
|
|
|
|
|
|
|
RUN apt-get update
|
|
|
|
RUN apt-get -qqy upgrade
|
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["mkdir /usr/local/src/ModeratorElection"]
|
2024-06-20 13:42:53 +00:00
|
|
|
WORKDIR /usr/local/src/ModeratorElection/
|
2024-06-20 22:27:52 +00:00
|
|
|
|
|
|
|
#*SNAPSHOT should be part of the name, asterisk for continueing versionnumber
|
2024-06-20 20:05:15 +00:00
|
|
|
#copy jar
|
2024-06-20 22:27:52 +00:00
|
|
|
#COPY --from=build-env /usr/local/src/ModeratorElection/build/libs/ModeratorElection.jar ./ModeratorElection.jar
|
2024-06-20 20:05:15 +00:00
|
|
|
#copy graalvm binary
|
2024-06-20 22:27:52 +00:00
|
|
|
COPY --from=build-env /usr/local/src/ModeratorElection/build/native/nativeCompile/ModeratorElection .
|
|
|
|
CMD ["chmod +x ModerationElection"]
|
2024-06-20 13:42:53 +00:00
|
|
|
#ENV MEMBERNAMES
|
2024-06-20 20:05:15 +00:00
|
|
|
#ENTRYPOINT ["java", "-jar", "ModeratorElection.jar"]
|
|
|
|
ENTRYPOINT ["ModeratorElection"]
|