25 lines
No EOL
907 B
Docker
25 lines
No EOL
907 B
Docker
FROM openjdk:18-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" ] |