forked from hello-nrfcloud/firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (32 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:22.04 as base
ARG NCS_VERSION=v2.4.2
ENV DEBIAN_FRONTEND=noninteractive
RUN <<EOT
apt-get -y update
apt-get -y upgrade
apt-get -y install wget unzip
EOT
# Install toolchain
# Make nrfutil install in a shared location, because when used with GitHub
# Actions, the image will be launched with the home dir mounted from the local
# checkout.
ENV NRFUTIL_HOME=/usr/local/share/nrfutil
# Install toolchain
RUN <<EOT
wget -q https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil
mv nrfutil /usr/local/bin
chmod +x /usr/local/bin/nrfutil
nrfutil install toolchain-manager
nrfutil toolchain-manager install --ncs-version ${NCS_VERSION}
nrfutil toolchain-manager list
EOT
# Prepare image with a ready to use build environment
ADD . /workdir
WORKDIR /workdir
SHELL ["nrfutil","toolchain-manager","launch","/bin/bash","--","-c"]
RUN <<EOT
west init -l . && west update --narrow -o=--depth=1
EOT
# Install Memfault CLI
SHELL ["/bin/sh", "-c"]
RUN apt-get -y install python3-pip && pip3 install memfault-cli