Skip to content

Commit 880c430

Browse files
committed
Deploy chip-ota-provider-app in container
1 parent 2ae17aa commit 880c430

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN \
99
set -x \
1010
&& apt-get update \
1111
&& apt-get install -y --no-install-recommends \
12+
curl \
1213
libuv1 \
1314
zlib1g \
1415
libjson-c5 \
@@ -25,6 +26,21 @@ RUN \
2526

2627
ARG PYTHON_MATTER_SERVER
2728

29+
ENV chip_example_url "https://github.com/agners/matter-linux-example-apps/releases/download/v1.3.0.0"
30+
ARG TARGETPLATFORM
31+
32+
RUN \
33+
set -x \
34+
&& echo "${TARGETPLATFORM}" \
35+
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
36+
curl -Lo /usr/local/bin/chip-ota-provider-app "${chip_example_url}/chip-ota-provider-app-x86-64"; \
37+
elif [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
38+
curl -Lo /usr/local/bin/chip-ota-provider-app "${chip_example_url}/chip-ota-provider-app-aarch64"; \
39+
else \
40+
exit 1; \
41+
fi \
42+
&& chmod +x /usr/local/bin/chip-ota-provider-app
43+
2844
# hadolint ignore=DL3013
2945
RUN \
3046
pip3 install --no-cache-dir "python-matter-server[server]==${PYTHON_MATTER_SERVER}"

0 commit comments

Comments
 (0)