-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (28 loc) · 1.09 KB
/
Copy pathDockerfile
File metadata and controls
33 lines (28 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Builds hslock.uf2 without installing the toolchain on the host.
#
# Usage (from repo root, submodules already checked out):
# docker build -t hslock-build .
# docker run --rm -v "$(pwd)":/src hslock-build
#
# The container only brings the toolchain + Pico SDK; your working tree is
# bind-mounted at /src and built in place, so hslock.uf2 lands directly in
# the repo root - no copy-out step needed.
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi \
libstdc++-arm-none-eabi-newlib \
build-essential \
git \
python3 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Pinned Pico SDK checkout, matching docs/BUILD.md's manual clone (no fixed
# tag there - pinned here for reproducible container builds).
ARG PICO_SDK_TAG=2.1.1
RUN git clone -b $PICO_SDK_TAG --depth 1 https://github.com/raspberrypi/pico-sdk.git /opt/pico-sdk \
&& cd /opt/pico-sdk && git submodule update --init --recursive --depth 1
ENV PICO_SDK_PATH=/opt/pico-sdk
WORKDIR /src
ENTRYPOINT ["./build.sh"]