From b10fe380019a038808ecfc1bf0570d2bff87fb0a Mon Sep 17 00:00:00 2001 From: MarkoSagadin Date: Thu, 10 Oct 2024 14:03:57 +0200 Subject: [PATCH] feat(ncs): append manager's env vars to the bashrc instead of using entrypoint call, since it doesn't always work. --- CHANGELOG.md | 9 ++++++++- ncs-zephyr/Dockerfile | 12 ++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc324a2..457156b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] +### Changed + +- ncs-zephyr Docker image now adds environment variables of the toolchain-manager to the bashrc file + to provide access to the installed tools. Previously that was done by the `ENTRYPOINT` command, + however that approach didn't always work with VSCode's Dev Containers. + ## [1.5.0] - 2024-09-24 ### Added @@ -74,4 +80,5 @@ All below changes are related to the ncs-zephyr Docker image: [1.2.0]: https://github.com/IRNAS/irnas-docker-software/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/IRNAS/irnas-docker-software/compare/v1.0.1...v1.1.0 [1.0.1]: https://github.com/IRNAS/irnas-docker-software/compare/v1.0.0...v1.0.1 -[1.0.0]: https://github.com/IRNAS/irnas-docker-software/compare/b08044e0137bcbbf5f060545de6b2d2a9f1ee8d8...v1.0.0 +[1.0.0]: + https://github.com/IRNAS/irnas-docker-software/compare/b08044e0137bcbbf5f060545de6b2d2a9f1ee8d8...v1.0.0 diff --git a/ncs-zephyr/Dockerfile b/ncs-zephyr/Dockerfile index eb59f22..238796b 100644 --- a/ncs-zephyr/Dockerfile +++ b/ncs-zephyr/Dockerfile @@ -78,8 +78,9 @@ RUN <> ~/.bashrc ############# # Dev image # @@ -161,5 +162,8 @@ RUN find /home/user/ncs/toolchains/ -path '**/usr/local/bin/*' | \ # Make 'user' default on launch USER user -SHELL ["/bin/bash", "-c"] -ENTRYPOINT ["nrfutil", "toolchain-manager", "launch", "--shell"] +# Append environment variables of the toolchain-manager to the user's bashrc to +# get access to the installed programs. +# Previously that was done with the ENTRYPOINT command, however that is a bit +# error prone for devcontainer usecases, as it isn't always taken into account. +RUN nrfutil toolchain-manager env --as-script sh >> ~/.bashrc