-
Notifications
You must be signed in to change notification settings - Fork 84
/
Dockerfile
52 lines (43 loc) · 1.36 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM python:3.12-slim-bookworm
# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /app
RUN \
set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
libuv1 \
zlib1g \
libjson-c5 \
libnl-3-200 \
libnl-route-3-200 \
unzip \
gdb \
iputils-ping \
iproute2 \
&& apt-get purge -y --auto-remove \
&& rm -rf \
/var/lib/apt/lists/* \
/usr/src/*
ARG PYTHON_MATTER_SERVER
ENV chip_example_url "https://github.com/home-assistant-libs/matter-linux-ota-provider/releases/download/2024.7.2"
ARG TARGETPLATFORM
RUN \
set -x \
&& echo "${TARGETPLATFORM}" \
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
curl -Lo /usr/local/bin/chip-ota-provider-app "${chip_example_url}/chip-ota-provider-app-x86-64"; \
elif [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
curl -Lo /usr/local/bin/chip-ota-provider-app "${chip_example_url}/chip-ota-provider-app-aarch64"; \
else \
exit 1; \
fi \
&& chmod +x /usr/local/bin/chip-ota-provider-app
# hadolint ignore=DL3013
RUN \
pip3 install --no-cache-dir "python-matter-server[server]==${PYTHON_MATTER_SERVER}"
VOLUME ["/data"]
EXPOSE 5580
ENTRYPOINT [ "matter-server" ]
CMD [ "--storage-path", "/data", "--paa-root-cert-dir", "/data/credentials" ]