The-Unstable-World/server-Dockerfile

30 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2019-12-15 01:07:53 -08:00
FROM alpine
2019-11-29 07:02:12 -08:00
2019-12-15 01:07:53 -08:00
RUN apk add --no-cache git build-base irrlicht-dev cmake bzip2-dev libpng-dev jpeg-dev libxxf86vm-dev mesa-dev sqlite-dev libogg-dev libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev gmp-dev jsoncpp-dev && \
cd /root && \
git clone --depth=1 https://github.com/minetest/minetest.git ./minetest && \
git clone --depth=1 https://github.com/minetest/minetest_game.git ./minetest/games/minetest_game && \
rm -fr ./minetest/games/minetest_game/.git && \
cd ./minetest && \
cmake . \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SERVER=TRUE \
-DBUILD_CLIENT=FALSE && \
make -j4 && \
make install DESTDIR=/root/out
2019-11-29 07:02:12 -08:00
2019-12-15 01:07:53 -08:00
FROM alpine
2019-11-29 23:24:16 -08:00
2019-12-15 01:07:53 -08:00
COPY --from=0 /root/out/usr/local/share/minetest /usr/local/share/minetest
2019-12-20 07:00:37 -08:00
COPY --from=0 /root/out/usr/local/bin/minetestserver /usr/local/bin/minetestserver
2019-12-15 01:07:53 -08:00
COPY --from=0 /root/out/usr/local/share/doc/minetest/minetest.conf.example /etc/minetest/minetest.conf
2019-11-29 07:02:12 -08:00
2019-12-15 01:07:53 -08:00
RUN apk add --no-cache sqlite-libs curl gmp libstdc++ libgcc && adduser -D minetest
2019-11-29 07:02:12 -08:00
2019-12-15 01:07:53 -08:00
USER minetest
2019-11-29 07:02:12 -08:00
2019-12-15 01:07:53 -08:00
EXPOSE 30000/udp
2019-11-29 07:02:12 -08:00
2019-12-15 01:07:53 -08:00
CMD ["/usr/local/bin/minetestserver", "--config", "/etc/minetest/minetest.conf"]