Created the Dockerfile

This commit is contained in:
Mathias Wagner 2024-02-16 00:36:41 +01:00
parent e5d1bc0d0d
commit b976c1c9a6
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM maven:3.8.7-openjdk-18-slim AS build
WORKDIR /app
RUN apt-get update && \
apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs
COPY pom.xml .
COPY src ./src
COPY webui ./webui
RUN mvn compile assembly:single
FROM openjdk:18-slim
WORKDIR /app
COPY --from=build /app/target/MCDash-Wrapper.jar ./server.jar
EXPOSE 7865
CMD ["java", "-jar", "server.jar"]