How to use nrf-docker in Bitbucket pipeline

I want to create automatic build using CI in bitbucket pipeline.

I would like to use image /nrf-docker to compile the project. I saw the article Build NCS application firmware images using Docker - Getting Started - nRF Connect SDK guides - Nordic DevZone (nordicsemi.com)

The usage of this image looks like:

Fullscreen
1
docker run --name ncs --rm -v ${PWD}:/workdir/ncs/fw-nrfconnect-nrf ncs /bin/bash -c 'cd ncs/fw-nrfconnect-nrf/applications/asset_tracker; west build -p always -b nrf9160_pca20035ns'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

But I would like to first run the image, and inside run the west build command. 

There is my example runner configuration.

 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
pipelines:
default:
- step:
name: 'Build'
image: nordicplayground/nrfconnect-sdk:v2.5-branch
runs-on:
- self.hosted
- linux
script:
- echo "Building start"
- west --version
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


And on output i got:

Fullscreen
1
2
+ west --version
bash: west: command not found
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
How to solve this. Eventually how to modify the docker image to obtain what i want.