Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. from debian:buster-slim as builder
  2. WORKDIR /minetest
  3. ARG VERSION="5.10.0"
  4. RUN apt-get update && \
  5. apt-get install -y \
  6. g++ make libc6-dev \
  7. cmake libbz2-dev libpng-dev \
  8. libjpeg-dev libxxf86vm-dev libgl1-mesa-dev \
  9. libsqlite3-dev libogg-dev libvorbis-dev \
  10. libopenal-dev libcurl4-gnutls-dev libfreetype6-dev \
  11. zlib1g-dev libgmp-dev libjsoncpp-dev \
  12. libzstd-dev libluajit-5.1-dev gettext \
  13. git
  14. RUN git clone https://github.com/minetest/minetest --depth=1 minetest && \
  15. git checkout ${VERSION}
  16. RUN chdir minetest && \
  17. cmake . -DRUN_IN_PLACE=TRUE -DBUILD_SEVER=TRUE -DBUILD_CLIENT=FALSE && \
  18. make -j$(nproc)
  19. from debian:buster-slim as final
  20. WORKDIR /minetest
  21. RUN apt-get update && \
  22. apt-get install -y \
  23. libsqlite3-0 libcc1-0 libgmpxx4ldbl \
  24. librtmp1 libcurl3-gnutls libzstd-dev \
  25. libjsoncpp-dev libluajit-5.1 gettext \
  26. && apt-get clean && rm -rf /var/lib/apt/lists/*
  27. COPY --from=builder /minetest/minetest/bin/minetestserver /minetest/bin/server
  28. COPY --from=builder /minetest/minetest/textures /minetest/textures
  29. COPY --from=builder /minetest/minetest/builtin /minetest/builtin
  30. EXPOSE 30000
  31. CMD ["./bin/server", "--worldname", "world"]