Fix the fully static image and the build image for the C++ sources

docker/static: the C++ unit tests link the static libstdc++, whose error
paths need an unwinder that --rtlib=compiler-rt does not provide; link
llvm-libunwind. The programs themselves still need no C++ runtime.

docker/build: build in the default bundled mode with CMake instead of
against libev/udns (Alpine's Mbed TLS 4 is not supported by system
mode).
This commit is contained in:
Max Lv
2026-10-15 00:34:32 +08:00
parent de54d92c92
commit 62cbdb6619
2 changed files with 8 additions and 6 deletions
+4 -5
View File
@@ -1,8 +1,7 @@
# Alpine with China mirror
# Development image for building shadowsocks-c. The default bundled mode
# builds every dependency from third_party/dist, so only a toolchain is
# needed (Alpine's Mbed TLS 4 is not supported by system mode).
FROM alpine
MAINTAINER wener <wenermail@gmail.com>
# Better for cache and dev
RUN apk add --no-cache --virtual .build-deps \
alpine-sdk cmake \
linux-headers libev-dev libsodium-dev mbedtls-static mbedtls-dev pcre2-dev udns-dev
build-base cmake ninja python3 linux-headers
+4 -1
View File
@@ -2,4 +2,7 @@
set -e
set -o xtrace
cmake -DBUILD_STATIC=OFF . && make && make install
cmake -S . -B build -G Ninja
cmake --build build
ctest --test-dir build -L 'unit|vendor' --output-on-failure
cmake --install build