53 lines
1.2 KiB
Docker
53 lines
1.2 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 zlib1g libfreeimage3 libglfw3 xinput libxfixes3 gosu tk && \
|
|
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
|
|
|
|
# Copy Build
|
|
COPY --from=build /app/minecraft-pi /app/minecraft-pi
|
|
|
|
WORKDIR /app/minecraft-pi
|
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
|
CMD ["./run.sh"]
|