mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-07-17 22:14:54 +00:00
Add SKIP_CHOWN_DATA to skip the "Changing ownership of /data" (#3103)
This commit is contained in:
@@ -3,3 +3,5 @@ To troubleshoot the container initialization, such as when server files are pre-
|
|||||||
To troubleshoot just the command-line used to start the Minecraft server, set the environment variable `DEBUG_EXEC` to `true`.
|
To troubleshoot just the command-line used to start the Minecraft server, set the environment variable `DEBUG_EXEC` to `true`.
|
||||||
|
|
||||||
To troubleshoot any issues with memory allocation reported by the JVM, set the environment variable `DEBUG_MEMORY` to `true`.
|
To troubleshoot any issues with memory allocation reported by the JVM, set the environment variable `DEBUG_MEMORY` to `true`.
|
||||||
|
|
||||||
|
If you are experiencing any issues with the "Changing ownership of /data" step, that can be disabled by setting `SKIP_CHOWN_DATA` to `true`.
|
||||||
|
|||||||
+2
-1
@@ -6,6 +6,7 @@
|
|||||||
# The Dockerfile ENVs take precedence here, but defaulting for testing consistency
|
# The Dockerfile ENVs take precedence here, but defaulting for testing consistency
|
||||||
: "${UID:=1000}"
|
: "${UID:=1000}"
|
||||||
: "${GID:=1000}"
|
: "${GID:=1000}"
|
||||||
|
: "${SKIP_CHOWN_DATA:=false}"
|
||||||
|
|
||||||
umask "${UMASK:=0002}"
|
umask "${UMASK:=0002}"
|
||||||
|
|
||||||
@@ -38,7 +39,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(stat -c "%u" /data) != "$UID" ]]; then
|
if isTrue "${SKIP_CHOWN_DATA}" || [[ $(stat -c "%u" /data) != "$UID" ]]; then
|
||||||
log "Changing ownership of /data to $UID ..."
|
log "Changing ownership of /data to $UID ..."
|
||||||
chown -R ${runAsUser}:${runAsGroup} /data
|
chown -R ${runAsUser}:${runAsGroup} /data
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user