forked from home-assistant-libs/python-matter-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (43 loc) · 1.4 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
53
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 \
&& rm -rf \
/var/lib/apt/lists/*
ARG PYTHON_MATTER_SERVER
ENV chip_example_url="https://github.com/home-assistant-libs/matter-linux-ota-provider/releases/download/2024.11.3"
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
# Upgrade pip to the latest version
RUN pip install --upgrade pip
# Install the custom Python Matter server from PyPI
RUN \
pip install --no-cache-dir "custom-python-matter-server[server]==${PYTHON_MATTER_SERVER}"
VOLUME ["/data"]
EXPOSE 5580
ENTRYPOINT ["matter-server"]
CMD ["--storage-path", "/data", "--paa-root-cert-dir", "/data/credentials"]