mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-12 23:27:13 +00:00
Add SKIP_CHOWN_DATA to skip the "Changing ownership of /data" (#3103)
This commit is contained in:
parent
f5da624789
commit
afbdfea0bb
2 changed files with 4 additions and 1 deletions
|
@ -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 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`.
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
# The Dockerfile ENVs take precedence here, but defaulting for testing consistency
|
||||
: "${UID:=1000}"
|
||||
: "${GID:=1000}"
|
||||
: "${SKIP_CHOWN_DATA:=false}"
|
||||
|
||||
umask "${UMASK:=0002}"
|
||||
|
||||
|
@ -38,7 +39,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
|
|||
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 ..."
|
||||
chown -R ${runAsUser}:${runAsGroup} /data
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue