diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-11 06:42:02 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-11 06:42:04 +0200 |
| commit | e29c0e4bbe8a84231ef8b1548c08e5c9bb5bc994 (patch) | |
| tree | 15a8e9da3118e472d24cd8260803deadf856241d | |
| parent | fix std::string_view usage (diff) | |
| download | math-server-e29c0e4bbe8a84231ef8b1548c08e5c9bb5bc994.tar.gz math-server-e29c0e4bbe8a84231ef8b1548c08e5c9bb5bc994.zip | |
docker: switch to Debian for base image
I don't know why, but starting from Alpine 3.19, even the simplest
Boost.Test programs segfault on exit with the call stack ending with the
function get_meta. This only happens on Release builds; it happens on
Alpine from 3.19 to 3.23 (the latest version at the time). I can't
figure out what's happening, so Imma just switch to Debian as the base
image. TODO: figure it out?
Diffstat (limited to '')
| -rw-r--r-- | client/Dockerfile | 14 | ||||
| -rw-r--r-- | server/Dockerfile | 14 |
2 files changed, 18 insertions, 10 deletions
diff --git a/client/Dockerfile b/client/Dockerfile index 41c0419..d7b5418 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,7 +1,7 @@ # To build, run from the top-level directory: # docker build -f client/Dockerfile -t egortensin/math-client . -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 ENTRYPOINT ["/opt/math-server/bin/math-client"] 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"] |
