Skip to content

Commit

Permalink
v0.2.2 (#7)
Browse files Browse the repository at this point in the history
* Execute in Alpine image.
* Run build in Debian. I like Debian.
  • Loading branch information
aa-ko authored Jan 10, 2023
1 parent e118962 commit 82a37c3
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM debian:11.6 as build

RUN apt update
RUN apt install -y --no-install-recommends wget rsync git build-essential python3 python3-pip python3-dev python3-pil python3-numpy
Expand All @@ -8,7 +8,15 @@ COPY Minecraft-Overviewer /overviewer
WORKDIR /overviewer
RUN python3 setup.py build

ENV MC_VERSION=1.19.2

FROM alpine:3.17.1 as autorender

# From here:
# https://stackoverflow.com/a/62555259
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools

# Minecraft world directory
VOLUME /world
Expand All @@ -17,10 +25,15 @@ VOLUME /cache
# Render target directory / web-server root
VOLUME /render

WORKDIR /overviewer

COPY --from=build /overviewer/ /overviewer/

COPY autorender.py /overviewer
COPY autorender-requirements.txt /overviewer
RUN pip3 install -r autorender-requirements.txt

ENV MC_VERSION=1.19.2
RUN mkdir -p ~/.minecraft/versions/${MC_VERSION}/
RUN wget https://overviewer.org/textures/${MC_VERSION} -O ~/.minecraft/versions/${MC_VERSION}/${MC_VERSION}.jar

Expand Down

0 comments on commit 82a37c3

Please sign in to comment.