Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ ENV RENDER_POI "true"
ENV RENDER_SIGNS_FILTER "-- RENDER --"
ENV RENDER_SIGNS_HIDE_FILTER "false"
ENV RENDER_SIGNS_JOINER "<br />"
ENV UID 1000
ENV GID 1000

# ---------------------------- #
# INSTALL & CONFIGURE DEFAULTS #
Expand Down Expand Up @@ -72,6 +74,4 @@ COPY download_url.py /home/minecraft/download_url.py

RUN chown minecraft:minecraft -R /home/minecraft/

USER minecraft

CMD ["bash", "/home/minecraft/entrypoint.sh"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ _Note:_ The `latest` Docker tag is rebuilt daily. If there are changes to the [u

- `RENDER_SIGNS_JOINER`
Default Value: `<br />`. Set to the string that should be used to join the lines on the sign while rendering. Value of `"<br />"` will make each in-game line it's own line on the render. A value of `" "` will make all the in-game lines a single line on the render.

- `UID`
Default Value: 1000. Set to the UID of the user the container process should run as.

- `GID`
Default Value: 1000. Set to the GID of the user the container process should run as.
14 changes: 14 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/bin/bash
if [ $(id -u) = 0 ]; then
echo "UID: ${UID}"
usermod -u ${UID} minecraft > /dev/null 2>&1
echo "GID: ${GID}"
groupmod -g ${GID} minecraft > /dev/null 2>&1
echo "Updating permissions..."
chown -R minecraft:minecraft /home/minecraft/render
echo "Done."
echo "Starting Overviewer."
su -c "bash $0" minecraft
else

set -o errexit

# Require MINECRAFT_VERSION environment variable to be set (no default assumed)
Expand Down Expand Up @@ -43,3 +55,5 @@ if [ "$RENDER_POI" == "true" ]; then
# shellcheck disable=SC2086
overviewer.py --config "$CONFIG_LOCATION" --genpoi $ADDITIONAL_ARGS_POI
fi

fi