FROM debian:buster as builder ADD . . RUN echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list && apt-get update && apt-get install --no-install-recommends -y -t buster-backports cmake dpkg-dev wget RUN ./scripts/install-dependencies.sh ARG TARGETARCH #Build #If build fails past this stage, you're probably missing the repository submodules RUN ./scripts/setup.sh server $TARGETARCH RUN ./scripts/build.sh server $TARGETARCH FROM debian:bullseye-slim as runtime # Install RUN \ apt-get update && \ apt-get install -y tini qemu-user && \ apt-get --fix-broken install -y && \ rm -rf /var/lib/apt/lists/* ARG TARGETARCH # Copy COPY --from=builder ./out/server-$TARGETARCH /app # Setup Working Directory RUN mkdir /data WORKDIR /data EXPOSE 19132/udp # Setup Entrypoint ENTRYPOINT ["/usr/bin/tini", "--"] CMD ["/app/usr/bin/minecraft-pi-reborn-server"]