Using Docker

The Docker image can be used to ease building new apps using a pre-configured environment.

It supports Docker for Mac, Linux and Windows.

To build or run the image, you have to install Docker.

Building image

Build it by the tag knot-zephyr-sdk.

$ docker build --tag=knot-zephyr-sdk .

Running the container

Run the latest image version at CESAR’s Docker Hub and pass the current working directory as the project folder. This folder shall contain all your project files.

At your project folder, run:

$ docker run -ti -v $(pwd)/:/workdir cesarbr/knot-zephyr-sdk:latest

If you want to run it from an image you built, replace cesarbr/knot-zephyr-sdk:latest by the tag you used.

Compile for your target board

container> $ knot make -b {BOARD}


Currently, KNoT support dk (nrf52840_pca10056) or dongle (nrf52840_pca10059) board. Replace {BOARD} with one of them.


Has two ways to flash the board, using nRF Connect application or Using KNoT CLI application (if on Linux).

First of all, connect the board to a USB port.

Using nRF Connect

Export the generated files to your project’s directory

container> $ knot export /workdir/output

The generated files can now be flashed to your device by using the nRF Connect for Desktop and its Programmer app.

On Programmer App:

1 - Select the board.

2 - On Add HEX file, include boot_sgn_apps.hex file.

3 - Click on Write to flash the board.

Using KNoT CLI on Linux

If using a Linux host with the necessary drivers for flashing the boards, you may give USB access to the container.

Before proceeding, make sure that you added your user to the dialout group.

$ sudo usermod -a -G dialout `whoami`

You can now access the container using the host /dev directory.

$ docker run -ti --privileged -v /dev:/dev -v $(pwd)/:/workdir cesarbr/knot-zephyr-sdk:latest

This will allow you to use the –flash flag to flash after building the project.

container> $ knot make -b {BOARD} --mcuboot


Currently, KNoT support dk (nrf52840_pca10056) or dongle (nrf52840_pca10059) board. Replace {BOARD} with one of them.

Using other knot commands

When inside the Docker container, you may use any KNoT command from the command line interface.

To get a list of all available commands, run:

container> $ knot --help

More info is available at the Thing CLI doc section.