minetest/Dockerfile

43 lines
1.3 KiB
Text
Raw Permalink Normal View History

2020-03-29 13:45:00 +02:00
FROM debian:buster
2018-06-23 11:10:23 +02:00
MAINTAINER Linuro <cpp@zom.bi>
EXPOSE 30000
2018-06-25 14:28:21 +02:00
# Set to TRUE if you want to use the server terminal.
# If so, make sure to not start the server with --terminal
# and specify an admin in your configuration.
ENV CURSES FALSE
2018-06-23 11:10:23 +02:00
2020-04-05 13:43:52 +02:00
ENV BUILD_PCKGS "build-essential cmake libirrlicht-dev git ca-certificates \
postgresql-server-dev-all luajit "
2018-06-23 11:10:23 +02:00
ENV LIVE_PCKGS "zlib1g-dev libbz2-dev libncurses-dev libsqlite3-dev \
libcurl4-gnutls-dev libfreetype6-dev libgmp-dev libjsoncpp-dev"
ENV DEBIAN_FRONTEND non-interactive
RUN apt-get update && \
apt-get install -y --no-install-recommends ${LIVE_PCKGS} ${BUILD_PCKGS}
# This will clone the minetest engine and game repositories.
RUN git clone --depth 1 https://github.com/minetest/minetest.git
WORKDIR minetest
RUN git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game
RUN cmake . -DRUN_IN_PLACE=FALSE -DBUILD_SERVER=TRUE \
2020-04-05 13:43:52 +02:00
-DBUILD_CLIENT=FALSE -DENABLE_POSTGRESQL=ON \
-DCMAKE_BUILD_TYPE=Release -DENABLE_CURSES=${CURSES}\
-DLUAJIT=1
2018-06-23 11:10:23 +02:00
2018-06-25 14:28:21 +02:00
RUN make install
2018-06-23 11:10:23 +02:00
2018-06-25 14:28:21 +02:00
# free up some space
2018-06-23 11:10:23 +02:00
RUN apt-get remove -y --autoremove ${BUILD_PCKGS} && \
apt-get clean && rm -rf /root/minetest
2020-04-05 13:43:52 +02:00
RUN useradd minetest -m -u 1000 && \
2018-06-23 11:10:23 +02:00
su minetest -c "mkdir -p ~/.minetest/worlds"
2018-06-25 14:28:21 +02:00
VOLUME /home/minetest/.minetest/worlds
2018-06-23 11:10:23 +02:00
USER minetest
2018-06-25 14:28:21 +02:00
CMD /usr/local/bin/minetestserver --info