-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile.ci
More file actions
63 lines (53 loc) · 1.92 KB
/
Dockerfile.ci
File metadata and controls
63 lines (53 loc) · 1.92 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV MENDER_ARTIFACT_VERSION=4.2.0
# https://docs.zephyrproject.org/4.0.0/develop/getting_started/index.html#install-dependencies
RUN apt-get update && apt install -y --no-install-recommends \
git \
cmake \
ninja-build \
gperf \
ccache \
dfu-util \
device-tree-compiler \
wget \
python3-dev \
python3-pip \
python3-setuptools \
python3-tk \
python3-wheel \
xz-utils \
file \
make \
gcc \
gcc-multilib \
g++-multilib \
libsdl2-dev \
libmagic1 \
jq
ARG ZEPHYR_SDK_VERSION=0.17.0
RUN mkdir /opt/toolchains && wget -qO- https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz \
| tar -xJ -C /opt/toolchains \
&& /opt/toolchains/zephyr-sdk-${ZEPHYR_SDK_VERSION}/setup.sh -c \
-t arm-zephyr-eabi \
-t xtensa-espressif_esp32_zephyr-elf \
-t xtensa-espressif_esp32s3_zephyr-elf
# tell cmake where to find the Zephyr SDK cmake packages
ENV CMAKE_PREFIX_PATH=/opt/toolchains
RUN pip install --no-cache-dir west==1.2.0 --break-system-packages
COPY west.yml /zephyr-workspace-cache/.manifest/west.yml
# Create a cache of the workspace
RUN cd /zephyr-workspace-cache \
&& west init -l .manifest \
&& west update --narrow --fetch-opt=--filter=tree:0
# install Python dependencies for the Zephyr workspace
RUN cd /zephyr-workspace-cache \
&& pip install --no-cache-dir -r zephyr/scripts/requirements.txt --break-system-packages
# Fix ESP32 build libraries not found error
RUN cd /zephyr-workspace-cache \
&& west blobs fetch hal_espressif
# Fetch and install mender-artifact
RUN apt update -yyq && apt install -yyq lcov \
&& wget "https://downloads.mender.io/repos/workstation-tools/pool/main/m/mender-artifact/mender-artifact_${MENDER_ARTIFACT_VERSION}-1+debian+bookworm_amd64.deb" \
-O mender-artifact.deb && \
apt install -yyq ./mender-artifact.deb