ModeratorElection/image/Dockerfile

30 lines
1,012 B
Docker

#Build Stage
#if npm is needed for development purposes, switch to node
#FROM node:22-bookworm-slim as build-env
FROM ubuntu:latest as build-env
ADD resources /tmp
RUN /tmp/install.sh
ENV LANG=en_US.UTF-8 \
JAVA_HOME=/usr/lib/jvm/graalvm
# Run stage
FROM ubuntu:latest
RUN apt-get update
RUN apt-get -qqy upgrade
EXPOSE 8080
CMD ["mkdir /usr/local/src/ModeratorElection"]
WORKDIR /usr/local/src/ModeratorElection/
#*SNAPSHOT should be part of the name, asterisk for continueing versionnumber
#copy jar
#COPY --from=build-env /usr/local/src/ModeratorElection/build/libs/ModeratorElection-0.0.1-SNAPSHOT.jar ./ModeratorElection.jar
#copy graalvm binary
COPY --from=build-env /usr/local/src/ModeratorElection/build/native/nativeCompile/ /usr/local/src/ModeratorElection/
#CMD ["chmod 0740 ModerationElection"]
#ENTRYPOINT ["java", "-jar", "ModeratorElection.jar"]
#COPY --from=build-env /tmp/test_bin/ /usr/local/src/ModeratorElection/
RUN chmod 0740 ./ModeratorElection
ENTRYPOINT ["./ModeratorElection"]