Skip to content

Commit 6711a07

Browse files
committed
Fix in dockerfile
1 parent e58e3aa commit 6711a07

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

ports/zephyr-cp/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ RUN pip install -r /tmp/requirements-dev.txt && rm /tmp/requirements-dev.txt
6868
RUN west sdk install
6969

7070
# Point CMake and west at the pre-built Zephyr workspace.
71+
# ZEPHYR_BASE is used by west and many Zephyr scripts.
72+
# CMAKE_PREFIX_PATH lets find_package(Zephyr) work without relying on the
73+
# per-user CMake package registry (~/.cmake/packages), which won't exist
74+
# when CI runs the container as a different UID than the build-time user.
7175
ENV ZEPHYR_BASE=/opt/zephyr-workspace/zephyr
76+
ENV CMAKE_PREFIX_PATH=/opt/zephyr-workspace/zephyr/share/zephyr-package:/opt/zephyr-workspace/zephyr/share/sysbuild-package
7277

7378
# Entrypoint ensures west can find its workspace from the bind-mounted
7479
# CircuitPython tree by symlinking .west if it doesn't already exist.

ports/zephyr-cp/entrypoint.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,4 @@ path = zephyr-config
3434
base = zephyr
3535
EOF
3636

37-
# Register Zephyr CMake packages for the current user. The Dockerfile ran
38-
# west zephyr-export during build (as root), but CI may run the container as
39-
# a different UID whose ~/.cmake/packages won't have those entries.
40-
cd "${ZEPHYR_WS}" && west zephyr-export 2>/dev/null || true
41-
cd "${PORT_DIR}"
42-
4337
exec "$@"

0 commit comments

Comments
 (0)