-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e4d9a9
commit 3db18ff
Showing
4 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM debian:bullseye as base | ||
|
||
# Set shell | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
ARG MATTER_SERVER_VERSION=1.0.7 | ||
ARG HOME_ASSISTANT_CHIP_VERSION=2022.11.1 | ||
|
||
WORKDIR /app | ||
|
||
RUN \ | ||
set -x \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libuv1 \ | ||
openssl \ | ||
zlib1g \ | ||
libjson-c5 \ | ||
python3-venv \ | ||
python3-pip \ | ||
python3-gi \ | ||
python3-gi-cairo \ | ||
python3-dbus \ | ||
python3-psutil \ | ||
unzip \ | ||
libcairo2 \ | ||
gdb \ | ||
git \ | ||
&& git clone --depth 1 -b master \ | ||
https://github.com/project-chip/connectedhomeip \ | ||
&& cp -r connectedhomeip/credentials /root/credentials \ | ||
&& rm -rf connectedhomeip \ | ||
&& apt-get purge -y --auto-remove \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /usr/src/* | ||
|
||
# hadolint ignore=DL3013 | ||
RUN \ | ||
pip3 install \ | ||
home-assistant-chip-clusters==${HOME_ASSISTANT_CHIP_VERSION} \ | ||
home-assistant-chip-core==${HOME_ASSISTANT_CHIP_VERSION} \ | ||
&& pip3 install --no-cache-dir python-matter-server=="${MATTER_SERVER_VERSION}" | ||
|
||
COPY docker-entrypoint.sh ./ | ||
|
||
VOLUME ["/data"] | ||
EXPOSE 5580 | ||
|
||
ENTRYPOINT ["./docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: "3.8" | ||
services: | ||
# python-matter-server | ||
matter-server: | ||
build: | ||
context: ./ | ||
dockerfile: Dockerfile.dev | ||
image: matter-server:latest | ||
container_name: matter-server | ||
restart: always | ||
security_opt: | ||
# needed for bluetooth via dbus | ||
- apparmor:unconfined | ||
ports: | ||
- "5580:5580" | ||
volumes: | ||
# Create an .env file that sets the USERDIR environment variable. | ||
- ${USERDIR}/docker/matter-server/data:/data/ | ||
- /run/dbus:/run/dbus:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
set -- matter-server --storage-path /data "$@" | ||
|
||
echo "Starting server:" "$@" | ||
exec "$@" |