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.

42 lines
1.4KB

  1. FROM debian:stretch
  2. USER root
  3. RUN apt-get update -y && \
  4. apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev \
  5. libsqlite3-dev libcurl4-gnutls-dev zlib1g-dev libgmp-dev libjsoncpp-dev git
  6. COPY . /usr/src/minetest
  7. RUN mkdir -p /usr/src/minetest/cmakebuild && cd /usr/src/minetest/cmakebuild && \
  8. cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DRUN_IN_PLACE=FALSE \
  9. -DBUILD_SERVER=TRUE \
  10. -DBUILD_CLIENT=FALSE \
  11. -DENABLE_SYSTEM_JSONCPP=1 \
  12. .. && \
  13. make -j2 && \
  14. rm -Rf ../games/minetest_game && git clone --depth 1 https://github.com/minetest/minetest_game ../games/minetest_game && \
  15. rm -Rf ../games/minetest_game/.git && \
  16. make install
  17. FROM debian:stretch
  18. USER root
  19. RUN groupadd minetest && useradd -m -g minetest -d /var/lib/minetest minetest && \
  20. apt-get update -y && \
  21. apt-get -y install libcurl3-gnutls libjsoncpp1 liblua5.1-0 libluajit-5.1-2 libpq5 libsqlite3-0 \
  22. libstdc++6 zlib1g libc6 && \
  23. apt-get clean && rm -rf /var/cache/apt/archives/* && \
  24. rm -rf /var/lib/apt/lists/*
  25. WORKDIR /var/lib/minetest
  26. COPY --from=0 /usr/local/share/minetest /usr/local/share/minetest
  27. COPY --from=0 /usr/local/bin/minetestserver /usr/local/bin/minetestserver
  28. COPY --from=0 /usr/local/share/doc/minetest/minetest.conf.example /etc/minetest/minetest.conf
  29. USER minetest
  30. EXPOSE 30000/udp
  31. CMD ["/usr/local/bin/minetestserver", "--config", "/etc/minetest/minetest.conf"]