Skip to content

Commit a8f768a

Browse files
committed
after looking at official example
1 parent 72803f4 commit a8f768a

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

ports/zephyr-cp/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,15 @@ RUN pip install -r zephyr/scripts/requirements.txt protobuf grpcio-tools
6464
COPY requirements-dev.txt /tmp/requirements-dev.txt
6565
RUN pip install -r /tmp/requirements-dev.txt && rm /tmp/requirements-dev.txt
6666

67-
# Install the Zephyr SDK and move it to a well-known path.
68-
# west sdk install puts it under ~/zephyr-sdk-<version>.
67+
# Install the Zephyr SDK to a well-known path.
68+
# We set HOME=/opt so west sdk install places it at /opt/zephyr-sdk-<version>,
69+
# then symlink to /opt/zephyr-sdk. setup.sh records its install path
70+
# internally, so we must not move the directory after installation.
71+
ENV HOME=/opt
6972
RUN west sdk install \
70-
&& mv /root/zephyr-sdk-* /opt/zephyr-sdk
73+
&& ln -s /opt/zephyr-sdk-* /opt/zephyr-sdk \
74+
&& /opt/zephyr-sdk/setup.sh -c
75+
ENV HOME=/root
7176

7277
# Point CMake and west at the pre-built Zephyr workspace.
7378
# ZEPHYR_BASE is used by west and many Zephyr scripts.

0 commit comments

Comments
 (0)