This repository contains a docker image suitable to compile zephyr applications from github actions.
The zephyr sdk version is 0.16.1
, which is the one recommended for zephyr 3.4.0
.
docker build --build-arg UID=$(id -u) --build-arg GID$(id -g) --tag zephyr-arm-build:latest .
docker run -it --rm -u $(id -u ${USER}):$(id -g ${USER}) -v <west top dir>:/src zephyr-arm-build:latest
From the container shell west
command can be run. The files are created with the same user id and group id as the user who ran the docker run
command.
⚠️ It is not yet possible to flash applications from the container image nor is it possible to flash from the host application which have been compiled from the container image usingwest
.
When using a new version of zephyr, this container must be updated.
Here are the minimum required changes:
- In
Dockerfile
:- the
FROM
directive should download an LTS version of ubuntu. Ideally the latest one. ZEPHYR_VERSION
: should match the zephyr version targetedMCUBOOT_VERSION
: should match the mcuboot version referenced by zephyr'swest.yml
ZSDK_VERSION
: should match the one recommended by theZEPHYR_VERSION
selectedGH_VERSION
: update to latest gh command line tool version
- the
- In this
README.md
- update the first section which reference the SDK used and zephyr version
Build the image, when everything is working, commit and push.
- go to zephyr-arm-docker-image repository
- Create a new release from the commit pushed earlier
- Provide details about the content of the release (ubuntu version, zephyr target version, zephyr SDK, gh version).
- On release creation, github workflows will start a job to compile and push the image to the github docker registry. Monitor the workflow for proper execution.