initial docker image

This commit is contained in:
array-in-a-matrix 2024-04-29 15:01:58 -04:00
parent dce8304c68
commit 6f4c045b47
2 changed files with 23 additions and 0 deletions

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
.github/

22
Dockerfile Normal file
View file

@ -0,0 +1,22 @@
#? Builder
FROM --platform=$BUILDPLATFORM amazoncorretto:22-alpine-full as builder
RUN apk update && apk upgrade
RUN apk add git
WORKDIR /src
COPY . /src
RUN git submodule init && git submodule update
RUN chmod +x gradlew && ./gradlew dist --scan
#? Runner
FROM --platform=$BUILDPLATFORM amazoncorretto:22-alpine-jdk as runner
RUN apk update && apk upgrade
COPY --from=builder /src/build/libs /app
CMD java -jar brainwine.jar
LABEL org.opencontainers.image.title="Brainwine"
LABEL org.opencontainers.image.description=" A portable private server for Deepworld."
LABEL org.opencontainers.image.source="https://github.com/kuroppoi/brainwine"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.documentation="https://github.com/kuroppoi/brainwine"
LABEL org.opencontainers.image.vendor=""