„Dockerfile“ hinzufügen
This commit is contained in:
parent
76acdb16a6
commit
ae37809665
1 changed files with 26 additions and 0 deletions
26
Dockerfile
Normal file
26
Dockerfile
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Use OpenJDK 17 as kaboom does
|
||||
FROM openjdk:17-alpine
|
||||
|
||||
# Install git
|
||||
RUN apk add git
|
||||
|
||||
# Make /kaboom directory
|
||||
RUN mkdir /kaboom
|
||||
RUN chown -Rfv nobody:nobody /kaboom
|
||||
|
||||
# Change user
|
||||
USER nobody
|
||||
WORKDIR /kaboom
|
||||
|
||||
# Download kaboom server
|
||||
RUN git clone https://github.com/kaboomserver/server.git server
|
||||
WORKDIR /kaboom/server
|
||||
|
||||
# Make some directories read only
|
||||
# Paths copied from https://github.com/kaboomserver/framework/blob/master/script/server.sh#L26
|
||||
RUN mkdir debug/ dumps/ plugins/update/
|
||||
RUN chmod -R 500 debug/ dumps/ plugins/bStats/ plugins/PluginMetrics/ plugins/update/
|
||||
|
||||
# Run the server
|
||||
# Args copied from https://github.com/kaboomserver/framework/blob/master/script/server.sh#L45
|
||||
CMD [ "java", "-jar", "-Xshare:on", "-Xss8M", "-XX:MaxDirectMemorySize=512M", "-XX:+UseContainerSupport", "-DPaper.IgnoreJavaVersion=true", "-Dpaper.playerconnection.keepalive=360", "-DIReallyKnowWhatIAmDoingISwear", "-jar", "server.jar", "nogui" ]
|
Loading…
Reference in a new issue