Building the project using Docker

Building using Docker is the simplest way to build the project on your local system. If you install Docker, it will contain all the dependencies in the image, and prevents the need to install them separately in your system.

Note

See Building nRF Connect SDK applications with Docker for more information.

The Docker image is not intended to be shared.

The Docker image is also used to automate the building of HEX files using GitHub Actions, which is used to continuously deliver the firmware builds in the out-of-tree example repository.

To build the Docker image for this project, run the following commands:

git clone --branch v1.8.x --single-branch \
  https://github.com/NordicSemiconductor/asset-tracker-cloud-firmware-azure nrf-asset-tracker-firmware-azure
cd nrf-asset-tracker-firmware-azure
docker build -t asset-tracker-firmware-docker .

Then, follow the configuration instructions for the firmware and add your settings to the firmware.conf file.

Build the project

Build the project for your nRF9160-based device using the specified commands.

Thingy:91 (PCA20035)

docker run --rm -v ${PWD}:/workdir/ncs/firmware asset-tracker-firmware-docker /bin/bash -c 'cd /workdir/ncs/firmware; west build -p always -b thingy91_nrf9160_ns -- -DOVERLAY_CONFIG="overlay-azure.conf;overlay-debug.conf;asset-tracker-cloud-firmware-azure.conf;firmware.conf"'
ls -la build/zephyr/merged.hex

nRF9160 DK (PCA10090)

docker run --rm -v ${PWD}:/workdir/ncs/firmware asset-tracker-firmware-docker /bin/bash -c 'cd /workdir/ncs/firmware; west build -p always -b nrf9160dk_nrf9160_ns -- -DOVERLAY_CONFIG="overlay-azure.conf;overlay-debug.conf;asset-tracker-cloud-firmware-azure.conf;firmware.conf"'
ls -la build/zephyr/merged.hex

Location of the HEX file

The built HEX file will be located in build/zephyr/merged.hex.