Switch to Debian apt packages, pin nrfx to v2.9.0

- Replace ARM tarball download with gcc-arm-none-eabi from apt
- Drop TARGETARCH/GCC_VERSION build args — no longer needed
- Pin nrfx submodule to v2.9.0 which still bundles mdk/ headers
- nrfx 3+ dropped mdk/ from the repo
This commit is contained in:
Krzysztof Cieślik
2026-05-21 19:50:25 +02:00
parent f654df0e78
commit d5244c1d66
3 changed files with 7 additions and 25 deletions

View File

@@ -1,23 +1,11 @@
FROM debian:bookworm-slim
ARG GCC_VERSION=13.2.rel1
ARG TARGETARCH=amd64
RUN apt-get update && apt-get install -y --no-install-recommends \
wget xz-utils cmake ninja-build \
gcc-arm-none-eabi \
binutils-arm-none-eabi \
libnewlib-arm-none-eabi \
cmake \
ninja-build \
&& rm -rf /var/lib/apt/lists/*
RUN case "${TARGETARCH}" in \
amd64) _arch=x86_64 ;; \
arm64) _arch=aarch64 ;; \
*) echo "unsupported arch: ${TARGETARCH}" >&2 && exit 1 ;; \
esac \
&& wget -qO /tmp/gcc.tar.xz \
"https://developer.arm.com/-/media/Files/downloads/gnu/${GCC_VERSION}/binrel/arm-gnu-toolchain-${GCC_VERSION}-${_arch}-arm-none-eabi.tar.xz" \
&& tar -xf /tmp/gcc.tar.xz -C /opt \
&& ln -s "/opt/arm-gnu-toolchain-${GCC_VERSION}-${_arch}-arm-none-eabi" /opt/arm-toolchain \
&& rm /tmp/gcc.tar.xz
ENV PATH="/opt/arm-toolchain/bin:${PATH}"
WORKDIR /src