summaryrefslogtreecommitdiffstatshomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/Dockerfile14
1 files changed, 9 insertions, 5 deletions
diff --git a/server/Dockerfile b/server/Dockerfile
index 376cd76..dd3e428 100644
--- a/server/Dockerfile
+++ b/server/Dockerfile
@@ -1,7 +1,7 @@
# To build, run from the top-level directory:
# docker build -f server/Dockerfile -t egortensin/math-server .
-FROM alpine:3.18 AS base
+FROM debian:trixie-slim AS base
ARG src_dir=/usr/src/math-server
@@ -10,8 +10,10 @@ FROM base AS builder
ARG src_dir
COPY [".", "$src_dir"]
-RUN build_deps='bash boost-dev cmake g++ make python3' && \
- apk add -q --no-cache $build_deps && \
+RUN build_deps='libboost-all-dev cmake g++ make python3' && \
+ apt update && \
+ DEBIAN_FRONTEND=noninteractive \
+ apt install -y --no-install-recommends $build_deps && \
cd -- "$src_dir" && \
make install CONFIGURATION=Release CMAKE_FLAGS='--cmake-arg=-DMATH_SERVER_TESTS=ON --cmake-arg=-DBoost_USE_STATIC_LIBS=OFF'
@@ -22,8 +24,10 @@ LABEL maintainer="Egor Tensin <egor@tensin.name>"
ARG src_dir
COPY --from=builder ["$src_dir/build/install", "/opt/math-server"]
-RUN runtime_deps='boost-filesystem boost-program_options boost-regex boost-unit_test_framework libstdc++' && \
- apk add -q --no-cache $runtime_deps && \
+RUN runtime_deps='libboost-filesystem1.83.0 libboost-program-options1.83.0 libboost-regex1.83.0 libboost-test1.83.0' && \
+ apt update && \
+ DEBIAN_FRONTEND=noninteractive \
+ apt install -y --no-install-recommends $runtime_deps && \
/opt/math-server/bin/math-server-unit-tests --log_level=all
CMD ["/opt/math-server/bin/math-server"]