Skip to content

Commit

Permalink
Switch to Git source for Overviewer (#91)
Browse files Browse the repository at this point in the history
As mentioned previously (#80, #81, #84, perhaps others), we have wanted to switch to a Git source for Overviewer, so that we always get the latest changes & fixes. The Debian packages tend to lag behind.
  • Loading branch information
mide authored May 15, 2021
1 parent 97c31da commit b0ac302
Showing 1 changed file with 30 additions and 19 deletions.
49 changes: 30 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,56 @@

FROM debian:stretch

LABEL MAINTAINER='Mark Ide Jr (https://www.mide.io)'
LABEL maintainer='Mark Ide Jr (https://www.mide.io)'

# Default to do both render Map + POI
ENV RENDER_MAP true
ENV RENDER_POI true
# --------------- #
# OPTION DEFAULTS #
# --------------- #

# Only render signs including this string, leave blank to render all signs
# See README.md for description of these options
ENV CONFIG_LOCATION /home/minecraft/config.py
ENV RENDER_MAP "true"
ENV RENDER_POI "true"
ENV RENDER_SIGNS_FILTER "-- RENDER --"

# Hide the filter string from the render
ENV RENDER_SIGNS_HIDE_FILTER "false"

# What to join the lines of the sign with when rendering POI
ENV RENDER_SIGNS_JOINER "<br />"

ENV CONFIG_LOCATION /home/minecraft/config.py
# ---------------------------- #
# INSTALL & CONFIGURE DEFAULTS #
# ---------------------------- #

# Hadolint DL4006: Set the SHELL option -o pipefail before RUN with a pipe in it
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /home/minecraft/

RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates=20200601~deb9u2 wget=1.18-5+deb9u3 gnupg=2.1.18-8~deb9u4 optipng=0.7.6-1+deb9u1 && \
echo "deb http://overviewer.org/debian ./" >> /etc/apt/sources.list && \
wget -q -O - https://overviewer.org/debian/overviewer.gpg.asc | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends minecraft-overviewer=0.16.12-0~overviewer1 && \
apt-get install -y --no-install-recommends \
build-essential=12.3 \
ca-certificates=20200601~deb9u2 \
git=1:2.11.0-3+deb9u7 \
optipng=0.7.6-1+deb9u1 \
python3=3.5.3-1 \
python3-dev=3.5.3-1 \
python3-numpy=1:1.12.1-3 \
python3-pil=4.0.0-4+deb9u2 \
wget=1.18-5+deb9u3 && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
groupadd minecraft -g 1000 && \
useradd -m minecraft -u 1000 -g 1000 && \
mkdir -p /home/minecraft/render /home/minecraft/server

RUN git clone --depth=1 git://github.com/overviewer/Minecraft-Overviewer.git

WORKDIR /home/minecraft/Minecraft-Overviewer/
RUN python3 setup.py build && \
python3 setup.py install

WORKDIR /home/minecraft/

COPY config/config.py /home/minecraft/config.py
COPY entrypoint.sh /home/minecraft/entrypoint.sh
COPY download_url.py /home/minecraft/download_url.py

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

WORKDIR /home/minecraft/

USER minecraft

CMD ["bash", "/home/minecraft/entrypoint.sh"]

0 comments on commit b0ac302

Please sign in to comment.