from debian:buster-slim as builder WORKDIR /minetest ARG VERSION="5.10.0" RUN apt-get update && \ apt-get install -y \ g++ make libc6-dev \ cmake libbz2-dev libpng-dev \ libjpeg-dev libxxf86vm-dev libgl1-mesa-dev \ libsqlite3-dev libogg-dev libvorbis-dev \ libopenal-dev libcurl4-gnutls-dev libfreetype6-dev \ zlib1g-dev libgmp-dev libjsoncpp-dev \ libzstd-dev libluajit-5.1-dev gettext \ git RUN git clone https://github.com/minetest/minetest --depth=1 minetest && \ git checkout ${VERSION} RUN chdir minetest && \ cmake . -DRUN_IN_PLACE=TRUE -DBUILD_SEVER=TRUE -DBUILD_CLIENT=FALSE && \ make -j$(nproc) from debian:buster-slim as final WORKDIR /minetest RUN apt-get update && \ apt-get install -y \ libsqlite3-0 libcc1-0 libgmpxx4ldbl \ librtmp1 libcurl3-gnutls libzstd-dev \ libjsoncpp-dev libluajit-5.1 gettext \ && apt-get clean && rm -rf /var/lib/apt/lists/* COPY --from=builder /minetest/minetest/bin/minetestserver /minetest/bin/server COPY --from=builder /minetest/minetest/textures /minetest/textures COPY --from=builder /minetest/minetest/builtin /minetest/builtin EXPOSE 30000 CMD ["./bin/server", "--worldname", "world"]