Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f3e3506
Update CHIP_VERSION to v1.5.0.1
lboue Jan 20, 2026
53f0f53
Build CHIP examples from source for v1.5.0.1
lboue Jan 20, 2026
3257e30
build(deps): add Python dependencies for connectedhomeip
lboue Jan 20, 2026
dd9241c
build(deps): add coloredlogs to Python dependencies in Dockerfile
lboue Jan 20, 2026
82af7b4
build(deps): clean up apt cache after installing dependencies in Dock…
lboue Jan 20, 2026
7e0b0f7
build(deps): update base image from debian:bullseye to debian:bookwor…
lboue Jan 20, 2026
5ac243a
build(deps): allow pip to install in the base environment (PEP 668)
lboue Jan 20, 2026
dda88e0
build(deps): set up Python virtual environment and install dependenci…
lboue Jan 20, 2026
66aab90
build: update build command for chip-tool examples in Dockerfile
lboue Jan 20, 2026
e07f851
build(deps): specify versions for click and coloredlogs; enhance buil…
lboue Jan 20, 2026
ae05dcd
build: update build command for chip-tool to source environment script
lboue Jan 20, 2026
e2a3ad8
build(deps): pin pip version to 23.3.2 in Dockerfile
lboue Jan 20, 2026
167e63c
build: update Dockerfile to initialize git submodules and modify buil…
lboue Jan 20, 2026
226a834
build: update Dockerfile to clone connectedhomeip with specific branc…
lboue Jan 20, 2026
f496ab0
build: update Dockerfile to install libgirepository and modify build …
lboue Jan 20, 2026
8f388e5
build: update Dockerfile to replace libgirepository-1.0-dev with gir1…
lboue Jan 20, 2026
cd089af
build: update Dockerfile to modify build command for chip-tool examples
lboue Jan 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 66 additions & 15 deletions chip_tool/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,16 @@ RUN \
&& make DESTDIR=./install install

# Use amd64 stage to generate ZAP files (zap-cli is only available for amd64)
FROM --platform=linux/amd64 debian:bullseye AS builder-amd64-base
FROM --platform=linux/amd64 debian:bookworm AS builder-amd64-base

ARG CHIP_VERSION

# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ENV VENV_PATH=/opt/chip-venv
ENV PATH="${VENV_PATH}/bin:${PATH}"

WORKDIR /usr/src

RUN \
Expand All @@ -80,12 +83,52 @@ RUN \
&& apt-get install -y --no-install-recommends \
git \
ca-certificates \
gir1.2-glib-2.0 \
libgirepository1.0-dev \
python3 \
&& git clone --depth 1 --no-single-branch -b master \
python3-venv \
python3-dev \
python3-pip \
&& python3 -m venv "${VENV_PATH}" \
&& . "${VENV_PATH}/bin/activate" \
&& pip install --no-cache-dir --upgrade pip==23.3.2 \
&& pip install --no-cache-dir click==8.1.7 coloredlogs==15.0.1 \
&& git clone --depth 1 --no-tags --branch ${CHIP_VERSION} \
https://github.com/project-chip/connectedhomeip \
&& cd connectedhomeip \
&& git fetch origin ${CHIP_VERSION} \
&& git checkout ${CHIP_VERSION}
&& scripts/checkout_submodules.py --shallow --platform linux \
&& rm -rf /var/lib/apt/lists/*

RUN \
set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
g++ \
make \
cmake \
ninja-build \
pkg-config \
libssl-dev \
libdbus-1-dev \
libglib2.0-dev \
libnl-3-dev \
libnl-route-3-dev \
libmbedtls-dev \
libavahi-client-dev \
curl \
wget \
git \
pigz \
gzip \
bzip2 \
xz-utils \
coreutils \
&& cd /usr/src/connectedhomeip \
&& bash -c "source scripts/activate.sh && scripts/build/build_examples.py --target linux-x86_64-chip-tool build" \
&& mkdir -p /usr/src/connectedhomeip/out/linux-x86_64-chip-tool \
&& find /usr/src/connectedhomeip -type f -name "chip-*" -path "*/out/*" -exec cp {} /usr/src/connectedhomeip/out/linux-x86_64-chip-tool/ \; \
&& rm -rf /var/lib/apt/lists/*

FROM $BUILD_FROM

Expand Down Expand Up @@ -118,23 +161,31 @@ COPY --from=builder-ttyd /usr/src/ttyd/build/install /

RUN \
set -x \
&& export REPO_OWNER="agners" \
&& export REPO_NAME="matter-linux-example-apps" \
&& if [ "${BUILD_ARCH}" = "amd64" ]; then \
export EXAMPLE_ARCH="x86-64"; \
export EXAMPLE_ARCH="x86_64"; \
elif [ "${BUILD_ARCH}" = "aarch64" ]; then \
export EXAMPLE_ARCH="aarch64"; \
else \
exit 1; \
fi \
&& export API_URL="https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/tags/${CHIP_VERSION}" \
&& curl -s $API_URL | \
jq -r --arg suffix "-${EXAMPLE_ARCH}" '.assets[] | select(.name | endswith($suffix)) | .browser_download_url, (.name | rtrimstr($suffix))' | \
while read -r url; read -r name; do \
echo "Downloading $url..."; \
curl -Lo "/usr/local/bin/$name" "$url"; \
chmod +x "/usr/local/bin/$name"; \
done
&& apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
g++ \
make \
cmake \
ninja-build \
pkg-config \
libssl-dev \
libdbus-1-dev \
libglib2.0-dev \
libnl-3-dev \
libnl-route-3-dev \
libmbedtls-dev \
libavahi-client-dev \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder-amd64-base /usr/src/connectedhomeip/out/linux-x86_64-chip-tool/chip-* /usr/local/bin/

RUN ldconfig

Expand Down
2 changes: 1 addition & 1 deletion chip_tool/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ build_from:
args:
LIBWEBSOCKETS_VERSION: 4.3.5
TTYD_VERSION: 1.7.7
CHIP_VERSION: v1.4.2.0
CHIP_VERSION: v1.5.0.1
Loading