Dockerfile 478 B

12345678910111213141516171819
  1. # Build stage
  2. FROM maven:3-openjdk-11-slim AS build
  3. COPY src /home/app/src
  4. COPY pom.xml /home/app
  5. RUN mvn clean compile assembly:single -f /home/app/pom.xml
  6. # Package stage
  7. FROM openjdk:11-jre-slim
  8. RUN apt update && apt install -y libfreetype-dev && rm -rf /var/lib/apt/lists/*
  9. COPY --from=build /home/app/target/server.jar /usr/local/lib/server.jar
  10. COPY config /config
  11. COPY resources /resources
  12. VOLUME /config
  13. EXPOSE 8080
  14. CMD ["java","-jar","/usr/local/lib/server.jar"]