From 8d6b295397f41629d53c111671aa920078d2fd16 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 22 Jul 2024 14:06:00 +0200 Subject: [PATCH] Add note about Docker default command (#826) --- README.md | 16 +++++++++++++++- compose.yml | 5 ++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d8452b51..7239061d 100644 --- a/README.md +++ b/README.md @@ -102,11 +102,25 @@ docker run -d \ --restart=unless-stopped \ --security-opt apparmor=unconfined \ -v $(pwd)/data:/data \ - -v /run/dbus:/run/dbus:ro \ --network=host \ ghcr.io/home-assistant-libs/python-matter-server:stable ``` +> [!NOTE] +> The container has a default command line set (see Dockerfile). If you intend to pass additional arguments, you have to pass the default command line as well. + +To use local commissioning with Bluetooth, make sure to pass the D-Bus socket as well: +``` +docker run -d \ + --name matter-server \ + --restart=unless-stopped \ + --security-opt apparmor=unconfined \ + -v $(pwd)/data:/data \ + -v /run/dbus:/run/dbus:ro \ + --network=host \ + ghcr.io/home-assistant-libs/python-matter-server:stable --storage-path /data --paa-root-cert-dir /data/credentials --bluetooth-adapter 0 +``` + ### Running using Docker compose ```sh diff --git a/compose.yml b/compose.yml index f0532f87..2696c453 100644 --- a/compose.yml +++ b/compose.yml @@ -12,4 +12,7 @@ services: volumes: # Create an .env file that sets the USERDIR environment variable. - ${USERDIR:-$HOME}/docker/matter-server/data:/data/ - - /run/dbus:/run/dbus:ro + # Required for Bluetooth via D-Bus + #- /run/dbus:/run/dbus:ro + # If you adjust command line, make sure to pass the default CMD arguments too: + #command: --storage-path /data --paa-root-cert-dir /data/credentials --bluetooth-adapter 0