From e29c0e4bbe8a84231ef8b1548c08e5c9bb5bc994 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 11 Jun 2026 06:42:02 +0200 Subject: 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? --- client/Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'client') 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 " 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"] -- cgit v1.3