minecraft-pi-reborn/Dockerfile.client
2021-02-08 22:52:39 -05:00

55 lines
1.3 KiB
Docker

# Runtime Base Environment
FROM arm32v7/debian:bullseye-slim AS runtime-base
ENV DEBIAN_FRONTEND noninteractive
RUN \
# Install Runtime Dependencies
apt-get update && \
apt-get install -y --no-install-recommends tini libgles1 libx11-6 libsdl1.2debian zlib1g libfreeimage3 libglfw3 xinput libxfixes3 gosu && \
rm -rf /var/lib/apt/lists/*
# Compile Environment
FROM runtime-base AS build
ENV DEBIAN_FRONTEND noninteractive
RUN \
# Install Dependencies
apt-get update && \
apt-get install -y --no-install-recommends libgles-dev libx11-dev libxrandr-dev libsdl1.2-dev gcc g++ libc-dev make cmake zlib1g-dev git wget ca-certificates libfreeimage-dev libglfw3-dev xinput libxfixes-dev && \
rm -rf /var/lib/apt/lists/*
# Add Build Scripts
ADD ./build /app/build
WORKDIR /app
RUN \
# Download MCPI
./build/download-minecraft-pi.sh && \
# Build LibPNG12
./build/build-libpng12.sh
# Add Code
ADD . /app
# Build Mods
RUN ./build/build-mods.sh
# Runtime Environment
FROM runtime-base AS runtime
# Setup /home Permissions
RUN \
mkdir -p /home && \
chmod -R a+rw /home
# Include Exported Libraries
COPY --from=build /app/export /
# Include Mods
COPY --from=build /app/minecraft-pi /app/minecraft-pi
WORKDIR /app/minecraft-pi
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["./run.sh"]