瀏覽代碼

added build deps for python_openzwave

Fabian Peter Hammerle 5 年之前
父節點
當前提交
7c60246ea4
共有 2 個文件被更改,包括 11 次插入3 次删除
  1. 4 0
      Dockerfile
  2. 7 3
      README.md

+ 4 - 0
Dockerfile

@@ -5,6 +5,10 @@ RUN find /usr/bin -type f -perm /g+s -exec echo chmod --changes g-s {} \;
 
 VOLUME /config
 
+# required to build python_openzwave
+# https://github.com/OpenZWave/python-openzwave
+RUN apt-get update && apt-get install --yes make g++ libudev-dev libyaml-dev
+
 RUN useradd --create-home hass && chown hass ~hass
 USER hass
 ENV PATH "/home/hass/.local/bin:${PATH}"

+ 7 - 3
README.md

@@ -5,10 +5,14 @@ https://github.com/home-assistant/home-assistant/blob/dev/virtualization/Docker/
 https://github.com/home-assistant/home-assistant/blob/dev/requirements_all.txt
 
 ```sh
-sudo docker build --tag=home-assistant .
-sudo docker volume create home-assistant-config
-sudo docker run --rm --publish=8123:8123 \
+$ sudo docker build --tag=home-assistant .
+$ sudo docker volume create home-assistant-config
+$ cat /etc/udev/rules.d/zwave.rules
+ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="zwave-dongle"
+# check permissions of /dev/zwave-dongle
+$ sudo docker run --rm --publish=8123:8123 \
     --mount "source=home-assistant-config,target=/config" \
+    --device /dev/zwave-dongle:/dev/zwave-dongle \
     --security-opt=no-new-privileges --cap-drop=all \
     home-assistant
 ```