mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
Build: Use MinGW posix thread variant for std::mutex support
The gcc/g++-mingw-w64-x86-64 metapackages pull in both posix and win32 variants, and update-alternatives defaults to win32 whose libstdc++ lacks std::mutex. Install only the posix variants and add an apt retry loop for flaky mirrors.
This commit is contained in:
1 parent
3842585777
commit
9ecd2e4e03
1 file changed
+31
+31
@@ -0,0 +1,31 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
# Use USTC mirror
|
||||
RUN sed -i \
|
||||
's|deb.debian.org/debian|mirrors.ustc.edu.cn/debian|g; \
|
||||
s|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' \
|
||||
/etc/apt/sources.list.d/debian.sources
|
||||
|
||||
# Install build tools and MinGW-w64 x86_64 toolchain
|
||||
RUN for i in 1 2 3 4 5; do \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
git \
|
||||
cmake \
|
||||
ninja-build \
|
||||
gcc-mingw-w64-x86-64-posix \
|
||||
g++-mingw-w64-x86-64-posix \
|
||||
binutils-mingw-w64-x86-64 \
|
||||
mingw-w64-x86-64-dev \
|
||||
&& break \
|
||||
|| { echo "apt install failed (attempt $i), retrying..."; sleep 5; }; \
|
||||
done \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get clean
|
||||
|
||||
COPY toolchains/x86_64-w64-mingw32.cmake /opt/toolchains/mingw-x64.cmake
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Reference in new issue
Block a user