mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-24 01:21:30 +00:00
b625d4e8ec
this also includes an update to the Dockerfile which bumps the Java version to 21
39 lines
760 B
Docker
39 lines
760 B
Docker
# Builder
|
|
FROM gradle:jdk21-alpine as builder
|
|
|
|
RUN apk add --update nodejs npm
|
|
|
|
WORKDIR /app
|
|
COPY ./ /app/
|
|
|
|
RUN gradle jar --no-daemon
|
|
|
|
# Fetch Data
|
|
FROM bitnami/git:2.43.0-debian-11-r1 as data
|
|
|
|
ARG DATA_REPOSITORY=https://gitlab.com/YuukiPS/GC-Resources.git
|
|
ARG DATA_BRANCH=4.0
|
|
|
|
WORKDIR /app
|
|
|
|
RUN git clone --branch ${DATA_BRANCH} --depth 1 ${DATA_REPOSITORY}
|
|
|
|
# Result Container
|
|
FROM amazoncorretto:21-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy built assets
|
|
COPY --from=builder /app/grasscutter-*.jar /app/grasscutter.jar
|
|
COPY --from=builder /app/keystore.p12 /app/keystore.p12
|
|
|
|
# Copy the resources
|
|
COPY --from=data /app/GC-Resources/Resources /app/resources/
|
|
|
|
# Copy startup files
|
|
COPY ./entrypoint.sh /app/
|
|
|
|
CMD [ "sh", "/app/entrypoint.sh" ]
|
|
|
|
EXPOSE 80 443 8888 22102
|