Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builder image #73

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

felipejfc
Copy link
Contributor

Add a dockerfile for working build environment on container, add docs.

Setting up a working environment to make ncs, zephyr, ndk and zigbee home all work well together can be challenging. Especially since there are so many different environments, linux, windows, osx, osx arm64, linux arm64 etc
So I think it will be nice to have a working container that saves the user the hassle of needing to set up everything manually.

@ffenix113
Copy link
Owner

Hello @felipejfc ,

Thank you for the PR!
But I think at this stage of the project it would be a bit easier to use solution suggested by @evanraalte here:

Regarding the build option for users. Perhaps a --build local and --build docker would suffice? In that case a seperate --flash option is required as well I think.

There is already a Docker image available to start with from Nordic, and it would be easier to add a build command, similar to existing one, which would use already available image.
Granted, image from Nordic should be treated as a base to build custom images, but it should be enough for our purposes.

@felipejfc
Copy link
Contributor Author

felipejfc commented Jul 18, 2024

Hey @ffenix113, even though there's an Image from Nordic (I used it as a base), it doesn't contain zb home binary, so to build with docker we either generate a new image where we include it or we copy a binary to inside the container in runtime which is not a great practice. Is this what you're suggesting or are you thinking on a third option?
With this image I've pushed we could implement the build --docker

@ffenix113
Copy link
Owner

Is this what you're suggesting or are you thinking on a third option?
With this image I've pushed we could implement the build --docker

What I meant was that there is currently a function that will run a command to actually build the firmware. By prepending a necessary Docker command (i.e. docker run --rm -v ... nordicplayground/nrfconnect-sdk:v2.6-branch west build ...) we can forward the build process to the docker image, without doing anything more complicated. The one issue I have currently with this approach is permissions, as Nordic's image uses root user inside, and this would not be ideal for resulting firmware, as user then would need root permissions to do any changes to resulting files.

I do have a somewhat working solution to change user by creating a new Docker image from Nordic's base image, but have not yet tried to merge it to the base image.

What could be a step forward after this is to have a leaner image without samples, docs, unnecessary modules/drivers that can be used more freely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants