This commit is contained in:
James E. A 2024-04-28 19:22:54 +02:00 committed by GitHub
commit be33c0b4ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
.dockerignore
*Dockerfile

22
standalone.Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM maven:3.6-jdk-11 as build
COPY . .
RUN git submodule update --init --recursive &&\
mvn clean install
FROM adoptopenjdk/openjdk11:alpine-jre
COPY --from=build ./bootstrap/standalone/target /opt/Geyser
ARG UID=1000
ARG GID=1000
RUN adduser --system --shell /bin/false -u $UID -g $GID --home /opt/Geyser geyser
RUN mkdir -v /var/lib/geyser && chown -v -R ${UID}:0 /var/lib/geyser
VOLUME /var/lib/geyser
USER geyser
WORKDIR /var/lib/geyser
EXPOSE 19132/udp
CMD ["java", "-jar", "/opt/Geyser/Geyser.jar"]