Miroir du dépôt minetest. https://gitlab.com/minetest/minetest.git
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.1KB

  1. FROM alpine:3.11
  2. ENV MINETEST_GAME_VERSION master
  3. COPY .git /usr/src/minetest/.git
  4. COPY CMakeLists.txt /usr/src/minetest/CMakeLists.txt
  5. COPY README.md /usr/src/minetest/README.md
  6. COPY minetest.conf.example /usr/src/minetest/minetest.conf.example
  7. COPY builtin /usr/src/minetest/builtin
  8. COPY cmake /usr/src/minetest/cmake
  9. COPY doc /usr/src/minetest/doc
  10. COPY fonts /usr/src/minetest/fonts
  11. COPY lib /usr/src/minetest/lib
  12. COPY misc /usr/src/minetest/misc
  13. COPY po /usr/src/minetest/po
  14. COPY src /usr/src/minetest/src
  15. COPY textures /usr/src/minetest/textures
  16. WORKDIR /usr/src/minetest
  17. RUN apk add --no-cache git build-base irrlicht-dev cmake bzip2-dev libpng-dev \
  18. jpeg-dev libxxf86vm-dev mesa-dev sqlite-dev libogg-dev \
  19. libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev \
  20. gmp-dev jsoncpp-dev postgresql-dev ca-certificates && \
  21. git clone --depth=1 -b ${MINETEST_GAME_VERSION} https://github.com/minetest/minetest_game.git ./games/minetest_game && \
  22. rm -fr ./games/minetest_game/.git
  23. WORKDIR /usr/src/
  24. RUN git clone --recursive https://github.com/jupp0r/prometheus-cpp/ && \
  25. mkdir prometheus-cpp/build && \
  26. cd prometheus-cpp/build && \
  27. cmake .. \
  28. -DCMAKE_INSTALL_PREFIX=/usr/local \
  29. -DCMAKE_BUILD_TYPE=Release \
  30. -DENABLE_TESTING=0 && \
  31. make -j2 && \
  32. make install
  33. WORKDIR /usr/src/minetest
  34. RUN mkdir build && \
  35. cd build && \
  36. cmake .. \
  37. -DCMAKE_INSTALL_PREFIX=/usr/local \
  38. -DCMAKE_BUILD_TYPE=Release \
  39. -DBUILD_SERVER=TRUE \
  40. -DENABLE_PROMETHEUS=TRUE \
  41. -DBUILD_UNITTESTS=FALSE \
  42. -DBUILD_CLIENT=FALSE && \
  43. make -j2 && \
  44. make install
  45. FROM alpine:3.11
  46. RUN apk add --no-cache sqlite-libs curl gmp libstdc++ libgcc libpq && \
  47. adduser -D minetest --uid 30000 -h /var/lib/minetest && \
  48. chown -R minetest:minetest /var/lib/minetest
  49. WORKDIR /var/lib/minetest
  50. COPY --from=0 /usr/local/share/minetest /usr/local/share/minetest
  51. COPY --from=0 /usr/local/bin/minetestserver /usr/local/bin/minetestserver
  52. COPY --from=0 /usr/local/share/doc/minetest/minetest.conf.example /etc/minetest/minetest.conf
  53. USER minetest:minetest
  54. EXPOSE 30000/udp 30000/tcp
  55. CMD ["/usr/local/bin/minetestserver", "--config", "/etc/minetest/minetest.conf"]