mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
parent
f65548894f
commit
1c5e4b17bf
@ -52,7 +52,8 @@ WORKDIR /data
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
|
||||
ENV JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
||||
ENV UID=1000 GID=1000 \
|
||||
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= LEVEL=world \
|
||||
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= SERVER_PORT=25565 ONLINE_MODE=TRUE CONSOLE=true
|
||||
|
@ -7,6 +7,12 @@ if [ $(id -u) = 0 ]; then
|
||||
if [[ -v GID ]]; then
|
||||
groupmod -g $GID minecraft
|
||||
fi
|
||||
|
||||
if [[ $(stat -c "%u" /data) != $UID ]]; then
|
||||
echo "Changing ownership of /data to $UID ..."
|
||||
chown -R minecraft:minecraft /data
|
||||
fi
|
||||
|
||||
su-exec minecraft:minecraft /start-configuration
|
||||
else
|
||||
exec /start-configuration
|
||||
|
Loading…
Reference in New Issue
Block a user