Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 14:30:17 +01:00
Add Dockerfile for standalone use
Example usage: docker build -t geyser -f standalone.Dockerfile https://github.com/GeyserMC/Geyser.git docker run -p 19132:19132/udp -v `pwd`/geyser:/var/lib/geyser geyser
Dieser Commit ist enthalten in:
Ursprung
5a8604fe54
Commit
d2c2dd54e4
2
.dockerignore
Normale Datei
2
.dockerignore
Normale Datei
@ -0,0 +1,2 @@
|
||||
.dockerignore
|
||||
*Dockerfile
|
22
standalone.Dockerfile
Normale Datei
22
standalone.Dockerfile
Normale Datei
@ -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"]
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren