3 ENV MINETEST_GAME_VERSION master
5 COPY .git /usr/src/minetest/.git
6 COPY CMakeLists.txt /usr/src/minetest/CMakeLists.txt
7 COPY README.md /usr/src/minetest/README.md
8 COPY minetest.conf.example /usr/src/minetest/minetest.conf.example
9 COPY builtin /usr/src/minetest/builtin
10 COPY cmake /usr/src/minetest/cmake
11 COPY doc /usr/src/minetest/doc
12 COPY fonts /usr/src/minetest/fonts
13 COPY lib /usr/src/minetest/lib
14 COPY misc /usr/src/minetest/misc
15 COPY po /usr/src/minetest/po
16 COPY src /usr/src/minetest/src
17 COPY textures /usr/src/minetest/textures
19 WORKDIR /usr/src/minetest
21 RUN apk add --no-cache git build-base irrlicht-dev cmake bzip2-dev libpng-dev \
22 jpeg-dev libxxf86vm-dev mesa-dev sqlite-dev libogg-dev \
23 libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev \
24 gmp-dev jsoncpp-dev postgresql-dev && \
25 git clone --depth=1 -b ${MINETEST_GAME_VERSION} https://github.com/minetest/minetest_game.git ./games/minetest_game && \
26 rm -fr ./games/minetest_game/.git && \
30 -DCMAKE_INSTALL_PREFIX=/usr/local \
31 -DCMAKE_BUILD_TYPE=Release \
33 -DBUILD_CLIENT=FALSE && \
39 RUN apk add --no-cache sqlite-libs curl gmp libstdc++ libgcc libpq && \
40 adduser -D minetest --uid 30000 -h /var/lib/minetest && \
41 chown -R minetest:minetest /var/lib/minetest
43 WORKDIR /var/lib/minetest
45 COPY --from=0 /usr/local/share/minetest /usr/local/share/minetest
46 COPY --from=0 /usr/local/bin/minetestserver /usr/local/bin/minetestserver
47 COPY --from=0 /usr/local/share/doc/minetest/minetest.conf.example /etc/minetest/minetest.conf
49 USER minetest:minetest
53 CMD ["/usr/local/bin/minetestserver", "--config", "/etc/minetest/minetest.conf"]