NordicPlayground / nrf-docker

Dockerfile example for building nRF Connect SDK applications with GitHub Actions
BSD 3-Clause "New" or "Revised" License
70 stars 34 forks source link

Show how to use a custom west.yml #98

Closed x-moe-x closed 4 months ago

x-moe-x commented 4 months ago

We tried to use a custom west.yml file in the following, non-successful ways:

Running:

docker run --rm \
    -v ${PWD}:/workdir/project \
    -w /workdir/project \
    nordicplayground/nrfconnect-sdk:v2.6-branch \
   "west config manifest.path project && west update && west build -p always -b our_custom_board --build-dir /workdir/project/build"

Leads to:

west config: error: unexpected arguments: ['&&', 'west', 'update', '&&', 'west', 'build', '-p', 'always', '-b', 'our_custom_board', '--build-dir', '/workdir/project/build']

Alternatively running:

docker run --rm \
    -v ${PWD}:/workdir/project \
    -w /workdir/project \
    nordicplayground/nrfconnect-sdk:v2.6-branch \
    sh -c \
   "west config manifest.path project && west update && west build -p always -b our_custom_board --build-dir /workdir/project/build"

Leads to:

usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...

The Zephyr RTOS meta-tool.

optional arguments:
  -h, --help            get help for west or a command
  -z ZEPHYR_BASE, --zephyr-base ZEPHYR_BASE
                        Override the Zephyr base directory. The default is
                        the manifest project with path "zephyr".
  -v, --verbose         Display verbose output. May be given multiple times
                        to increase verbosity.
  -V, --version         print the program version and exit

...
...

If we are running all commands in separate sessions invoking the docker image our custom board is not found.