fix(docker): install required native build tools for Rust dependencies in the build image

This commit is contained in:
2026-04-11 12:32:46 +00:00
parent 254d7f3633
commit 2f16c5efae
4 changed files with 20 additions and 2 deletions

View File

@@ -2,6 +2,18 @@
## STAGE 1 // BUILD
FROM code.foss.global/host.today/ht-docker-node:lts AS build
# System build tools that the Rust dep tree needs beyond the base image:
# - cmake : used by the `cmake` crate (transitive via ort_sys / a webrtc
# sub-crate) to build a C/C++ library from source when a
# prebuilt-binary download path doesn't apply.
# - pkg-config : used by audiopus_sys and other *-sys crates to locate libs
# on the native target (safe no-op if they vendor their own).
# These are normally pre-installed on dev machines but not in ht-docker-node:lts.
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# buildx sets TARGETARCH automatically for each platform it's building:
# linux/amd64 -> TARGETARCH=amd64
# linux/arm64 -> TARGETARCH=arm64