Skip to content

Commit 12ce460

Browse files
committed
Fix Docker build: Ninja generator, static libs, bookworm boost version
- Use Ninja generator and RelWithDebInfo in Dockerfile build stage - Add CMAKE_FIND_LIBRARY_SUFFIXES=".a" for static linking - Fix runtime libboost-context version (1.81.0 → 1.74.0 for bookworm) - Exclude .git/ from Docker context
1 parent 6146f91 commit 12ce460

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ build/
33
build-san/
44
install/
55
_build/
6+
.git/

docker/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ RUN mkdir -p /opt/moxygen && tar xzf /tmp/moxygen.tar.gz -C /opt/moxygen
4040
# Copy o-rly source (use .dockerignore to exclude build dirs)
4141
COPY . /build
4242

43-
RUN cmake -S /build -B /build/_build --preset default \
43+
RUN cmake -S /build -B /build/_build -G Ninja \
44+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
45+
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
4446
-DCMAKE_PREFIX_PATH=/opt/moxygen \
4547
-DBUILD_TESTING=OFF \
4648
&& cmake --build /build/_build -j"$(nproc)" \
@@ -58,7 +60,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5860
libgflags2.2 \
5961
libgoogle-glog0v6 \
6062
libsodium23 \
61-
libboost-context1.81.0 \
63+
libboost-context1.74.0 \
6264
libssl3 \
6365
zlib1g \
6466
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)