summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2020-04-27 08:31:37 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2020-04-29 07:48:08 +0200
commit56bababcdfce097a4e08cc3d1de8d798e7999ce7 (patch)
treeaef707d6abdcd86bc1520c668f7e2ee4533a638e /Dockerfile
parenta36c9c3e930608386b983ea76158793fe9d622f6 (diff)
downloadminetest-56bababcdfce097a4e08cc3d1de8d798e7999ce7.tar.gz
minetest-56bababcdfce097a4e08cc3d1de8d798e7999ce7.tar.bz2
minetest-56bababcdfce097a4e08cc3d1de8d798e7999ce7.zip
Add MetricsBackend with prometheus counter support
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile22
1 files changed, 18 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index 7c1107288..72343ab9c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,15 +21,29 @@ WORKDIR /usr/src/minetest
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 postgresql-dev && \
+ gmp-dev jsoncpp-dev postgresql-dev ca-certificates && \
git clone --depth=1 -b ${MINETEST_GAME_VERSION} https://github.com/minetest/minetest_game.git ./games/minetest_game && \
- rm -fr ./games/minetest_game/.git && \
- mkdir build && \
+ 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 .. \
+ -DCMAKE_INSTALL_PREFIX=/usr/local \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DENABLE_TESTING=0 && \
+ make -j2 && \
+ make install
+
+WORKDIR /usr/src/minetest
+RUN mkdir build && \
cd build && \
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SERVER=TRUE \
+ -DENABLE_PROMETHEUS=TRUE \
-DBUILD_UNITTESTS=FALSE \
-DBUILD_CLIENT=FALSE && \
make -j2 && \
@@ -49,6 +63,6 @@ COPY --from=0 /usr/local/share/doc/minetest/minetest.conf.example /etc/minetest/
USER minetest:minetest
-EXPOSE 30000/udp
+EXPOSE 30000/udp 30000/tcp
CMD ["/usr/local/bin/minetestserver", "--config", "/etc/minetest/minetest.conf"]