2022-04-09 13:05:37 +02:00
|
|
|
FROM alpine:3.14
|
2020-04-12 17:00:56 +08:00
|
|
|
|
2022-12-28 15:04:06 -04:00
|
|
|
ENV MINETEST_GAME_VERSION original-2.0.3
|
2020-04-12 17:00:56 +08:00
|
|
|
|
2020-08-25 09:59:52 +02:00
|
|
|
COPY .git /usr/src/multicraft/.git
|
|
|
|
COPY CMakeLists.txt /usr/src/multicraft/CMakeLists.txt
|
|
|
|
COPY README.md /usr/src/multicraft/README.md
|
|
|
|
COPY multicraft.conf.example /usr/src/multicraft/multicraft.conf.example
|
|
|
|
COPY builtin /usr/src/multicraft/builtin
|
|
|
|
COPY cmake /usr/src/multicraft/cmake
|
|
|
|
COPY doc /usr/src/multicraft/doc
|
|
|
|
COPY fonts /usr/src/multicraft/fonts
|
|
|
|
COPY lib /usr/src/multicraft/lib
|
|
|
|
COPY misc /usr/src/multicraft/misc
|
|
|
|
COPY po /usr/src/multicraft/po
|
|
|
|
COPY src /usr/src/multicraft/src
|
|
|
|
COPY textures /usr/src/multicraft/textures
|
2020-04-12 17:00:56 +08:00
|
|
|
|
2020-08-25 09:59:52 +02:00
|
|
|
WORKDIR /usr/src/multicraft
|
2020-04-12 17:00:56 +08:00
|
|
|
|
2023-01-03 16:50:27 -04:00
|
|
|
RUN apk add --no-cache git build-base \
|
|
|
|
bzip2-dev \
|
|
|
|
cmake \
|
|
|
|
gmp-dev \
|
|
|
|
curl-dev \
|
|
|
|
freetype-dev \
|
|
|
|
gettext-dev \
|
|
|
|
hiredis-dev \
|
|
|
|
libjpeg-turbo-dev \
|
|
|
|
irrlicht-dev \
|
|
|
|
libogg-dev \
|
|
|
|
libpng-dev \
|
|
|
|
libvorbis-dev \
|
|
|
|
libxi-dev \
|
|
|
|
luajit-dev \
|
|
|
|
jsoncpp-dev \
|
|
|
|
mesa-dev \
|
|
|
|
openal-soft-dev \
|
|
|
|
openssl-dev \
|
|
|
|
samurai \
|
|
|
|
postgresql-dev \
|
|
|
|
sqlite-dev \
|
|
|
|
zlib-dev \
|
|
|
|
zstd-dev \
|
|
|
|
libxxf86vm-dev \
|
|
|
|
ca-certificates && \
|
|
|
|
git clone --depth=1 -b master https://codeberg.org/minenux/minetest-game-minetest.git ./games/minetest_game && \
|
2020-04-27 08:31:37 +02:00
|
|
|
rm -fr ./games/minetest_game/.git
|
|
|
|
|
|
|
|
WORKDIR /usr/src/
|
|
|
|
RUN git clone --recursive https://github.com/jupp0r/prometheus-cpp/ && \
|
|
|
|
mkdir prometheus-cpp/build && \
|
|
|
|
cd prometheus-cpp/build && \
|
|
|
|
cmake .. \
|
2023-01-03 16:50:27 -04:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2020-04-27 08:31:37 +02:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DENABLE_TESTING=0 && \
|
|
|
|
make -j2 && \
|
|
|
|
make install
|
|
|
|
|
2020-08-25 09:59:52 +02:00
|
|
|
WORKDIR /usr/src/multicraft
|
2020-04-27 08:31:37 +02:00
|
|
|
RUN mkdir build && \
|
2020-04-12 17:00:56 +08:00
|
|
|
cd build && \
|
|
|
|
cmake .. \
|
2020-04-27 08:31:37 +02:00
|
|
|
-DENABLE_PROMETHEUS=TRUE \
|
2020-04-16 20:43:49 +02:00
|
|
|
-DBUILD_UNITTESTS=FALSE \
|
2023-01-03 16:50:27 -04:00
|
|
|
-DCUSTOM_BINDIR=/usr/bin \
|
|
|
|
-DCUSTOM_DOCDIR="/usr/share/doc/$pkgname" \
|
|
|
|
-DCUSTOM_SHAREDIR="/usr/share/games/$pkgname" \
|
|
|
|
-DBUILD_SERVER=ON \
|
|
|
|
-DRUN_IN_PLACE=OFF \
|
|
|
|
-DENABLE_CURL=ON \
|
|
|
|
-DENABLE_SOUND=ON \
|
|
|
|
-DENABLE_LUAJIT=ON \
|
|
|
|
-DENABLE_GETTEXT=ON \
|
|
|
|
-DENABLE_FREETYPE=ON \
|
|
|
|
-DENABLE_SYSTEM_GMP=ON \
|
|
|
|
-DENABLE_SYSTEM_JSONCPP=ON \
|
|
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
|
|
-DENABLE_SPATIAL=ON \
|
|
|
|
-DENABLE_LEVELDB=ON \
|
|
|
|
-DENABLE_REDIS=OFF \
|
|
|
|
-DENABLE_POSTGRESQL=ON \
|
|
|
|
-DJSON_INCLUDE_DIR=/usr/include/jsoncpp \
|
|
|
|
-DFREETYPE_INCLUDE_DIR_freetype2=/usr/include/freetype2 \
|
|
|
|
-DFREETYPE_INCLUDE_DIR_ft2build=/usr/include \
|
|
|
|
-DLEVELDB_INCLUDE_DIR=/usr/include/leveldb \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
2020-04-12 17:00:56 +08:00
|
|
|
-DBUILD_CLIENT=FALSE && \
|
|
|
|
make -j2 && \
|
|
|
|
make install
|
2018-12-12 00:00:08 +01:00
|
|
|
|
2022-04-09 13:05:37 +02:00
|
|
|
FROM alpine:3.14
|
2018-12-12 00:00:08 +01:00
|
|
|
|
2020-09-26 15:32:49 +02:00
|
|
|
RUN apk add --no-cache sqlite-libs curl gmp libstdc++ libgcc libpq luajit && \
|
2023-01-03 16:50:27 -04:00
|
|
|
adduser -D multicraft --uid 30000 -h /var/games/multicraft && \
|
|
|
|
chown -R multicraft:multicraft /var/games/multicraft
|
2018-12-12 00:00:08 +01:00
|
|
|
|
2023-01-03 16:50:27 -04:00
|
|
|
WORKDIR /var/games/multicraft
|
2018-12-12 00:00:08 +01:00
|
|
|
|
2020-08-25 09:59:52 +02:00
|
|
|
COPY --from=0 /usr/local/share/doc/multicraft/multicraft.conf.example /etc/multicraft/multicraft.conf
|
2018-12-12 00:00:08 +01:00
|
|
|
|
2020-08-25 09:59:52 +02:00
|
|
|
USER multicraft:multicraft
|
2018-12-12 00:00:08 +01:00
|
|
|
|
2020-04-27 08:31:37 +02:00
|
|
|
EXPOSE 30000/udp 30000/tcp
|
2018-12-12 00:00:08 +01:00
|
|
|
|
2023-01-03 16:50:27 -04:00
|
|
|
CMD ["/usr/bin/multicraftserver", "--port", "30000", "--config", "/etc/multicraft/multicraft.conf", "--logfile", "/var/games/multicraft.log", "--server"]
|