Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 minetest && \
  15. cd minetest && \
  16. git checkout ${VERSION}
  17. RUN chdir minetest && \
  18. cmake . -DRUN_IN_PLACE=TRUE -DBUILD_SEVER=TRUE -DBUILD_CLIENT=FALSE && \
  19. make -j$(nproc)
  20. from debian:buster-slim as final
  21. WORKDIR /minetest
  22. RUN apt-get update && \
  23. apt-get install -y \
  24. libsqlite3-0 libcc1-0 libgmpxx4ldbl \
  25. librtmp1 libcurl3-gnutls libzstd-dev \
  26. libjsoncpp-dev libluajit-5.1 gettext \
  27. libatomic1 \
  28. && apt-get clean && rm -rf /var/lib/apt/lists/*
  29. COPY --from=builder /minetest/minetest/bin/luantiserver /minetest/bin/server
  30. COPY --from=builder /minetest/minetest/textures /minetest/textures
  31. COPY --from=builder /minetest/minetest/builtin /minetest/builtin
  32. EXPOSE 30000
  33. #EXPOSE 8080
  34. CMD ["./bin/server", "--worldname", "world"]