Dockerfile 760 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Builder
  2. FROM gradle:jdk17-alpine as builder
  3. RUN apk add --update nodejs npm
  4. WORKDIR /app
  5. COPY ./ /app/
  6. RUN gradle jar --no-daemon
  7. # Fetch Data
  8. FROM bitnami/git:2.43.0-debian-11-r1 as data
  9. ARG DATA_REPOSITORY=https://gitlab.com/YuukiPS/GC-Resources.git
  10. ARG DATA_BRANCH=4.0
  11. WORKDIR /app
  12. RUN git clone --branch ${DATA_BRANCH} --depth 1 ${DATA_REPOSITORY}
  13. # Result Container
  14. FROM amazoncorretto:17-alpine
  15. WORKDIR /app
  16. # Copy built assets
  17. COPY --from=builder /app/grasscutter-*.jar /app/grasscutter.jar
  18. COPY --from=builder /app/keystore.p12 /app/keystore.p12
  19. # Copy the resources
  20. COPY --from=data /app/GC-Resources/Resources /app/resources/
  21. # Copy startup files
  22. COPY ./entrypoint.sh /app/
  23. CMD [ "sh", "/app/entrypoint.sh" ]
  24. EXPOSE 80 443 8888 22102