itzg / itzg/docker-minecraft-bedrock-server
UID GID option non root user fails to start
- Dominant language
- Shell
- Stars
- 1.9k
- Forks
- 302
- Avg merge
- 2h 26m
- Merged PRs (30d)
- 2
Description
Thank you for your awesome work.
I saw you had flags for this container to specify a non root user to run the minecraft processes. This is fantastic and what I would do on my bare metal server.
I added the
-e UID=1002 -e GID=1003
to the run command for the respective user and group
Only when I try this on the Bedrock Edition container it wont' run and I get this in the docker log
> DEBU[0000] Using /data to match uid and gid
> DEBU[0000] Resolved 1002 from environment variable UID
> DEBU[0000] Resolved 1003 from environment variable GID
> /opt/bedrock-entry.sh: line 44: restify.err: Permission denied
> /opt/bedrock-entry.sh: line 44: restify.err: Permission denied
> /opt/bedrock-entry.sh: line 44: restify.err: Permission denied
> /opt/bedrock-entry.sh: line 44: restify.err: Permission denied
> /opt/bedrock-entry.sh: line 44: restify.err: Permission denied
> /opt/bedrock-entry.sh: line 44: restify.err: Permission denied
> Failed to extract download URL '' from https://www.minecraft.net/en-us/download/server/bedrock/
> cat: restify.err: No such file or directory
seems like a file permission error and it needs root?
This worked without a hitch on the Java server so I don't think I'm doing something wrong? Unless I am :)
The container works just fine if I leave the user and group id and let it use root, but I'd rather not if I can get away with it
Contributor guide
Research direction
Reproduce the Bedrock container with UID=1002 and GID=1003, then inspect /opt/bedrock-entry.sh around line 44 and the logged restify.err permission failures. Done means the container starts with non-root credentials and successfully extracts the Bedrock download URL without those errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100