Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ncs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,21 @@ RUN \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf ncs/downloads

WORKDIR /workdir

# Prepare image with a ready to use build environment
SHELL ["nrfutil","toolchain-manager","launch","/bin/bash","--","-c"]
RUN <<EOT
west init -m https://github.com/nrfconnect/sdk-nrf --mr ${NCS_SDK_VERSION} .
if [[ $NCS_VERSION =~ "^[a-fA-F0-9]{32}$" ]]; then
git checkout ${NCS_SDK_VERSION};
fi
west update --narrow -o=--depth=1
EOT

# Launch into build environment with the passed arguments
# Currently this is not supported in GitHub Actions
# See https://github.com/actions/runner/issues/1964
ENTRYPOINT [ "nrfutil", "toolchain-manager", "launch", "/bin/bash", "--", "/root/entry.sh" ]
COPY ./ncs/entry.sh /root/entry.sh
3 changes: 3 additions & 0 deletions ncs/entry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exec $@