{"id":19979056,"url":"https://github.com/fphammerle/docker-home-assistant","last_synced_at":"2025-05-04T04:32:28.406Z","repository":{"id":40452499,"uuid":"260909966","full_name":"fphammerle/docker-home-assistant","owner":"fphammerle","description":"home-assistant running as unprivileged user on alpine","archived":false,"fork":false,"pushed_at":"2023-11-24T08:56:35.000Z","size":147,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-11-24T09:39:36.894Z","etag":null,"topics":["docker","docker-compose","home-assistant","home-automation","unprivileged-user"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/fphammerle/home-assistant/tags","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fphammerle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-03T12:23:12.000Z","updated_at":"2023-11-24T09:39:36.894Z","dependencies_parsed_at":"2023-11-17T16:46:28.910Z","dependency_job_id":"c7bdeb6d-8422-471a-89fd-b91845b68bb5","html_url":"https://github.com/fphammerle/docker-home-assistant","commit_stats":null,"previous_names":[],"tags_count":47,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphammerle%2Fdocker-home-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphammerle%2Fdocker-home-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphammerle%2Fdocker-home-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphammerle%2Fdocker-home-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fphammerle","download_url":"https://codeload.github.com/fphammerle/docker-home-assistant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224385203,"owners_count":17302442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","home-assistant","home-automation","unprivileged-user"],"created_at":"2024-11-13T03:36:17.260Z","updated_at":"2024-11-13T03:36:17.881Z","avatar_url":"https://github.com/fphammerle.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker: home assistant 🏡🐳\n\nsimple wrapper for\n[home-assistant](https://github.com/home-assistant/home-assistant)'s\n[official docker image](https://hub.docker.com/r/homeassistant/home-assistant).\n\nchanges:\n* dropped `setuid` and `setgid` permission bits from all files\n* run home assistant as an unprivileged user (instead of `root`)\n\nguide: https://www.home-assistant.io/docs/installation/docker/\n\ndockerfile: https://git.hammerle.me/fphammerle/docker-home-assistant/src/master/Dockerfile\n\nsigned docker image hashes: https://github.com/fphammerle/docker-home-assistant/tags\n\n```sh\n$ sudo docker run --name home_assistant \\\n    -v home_assistant_config:/config:rw \\\n    -p 8123:8123 \\\n    --read-only --tmpfs /home/hass/.config/async_dns:mode=1777,size=4k \\\n    --security-opt=no-new-privileges --cap-drop=all \\\n    --restart unless-stopped \\\n    fphammerle/home-assistant\n```\n\n## mount zwave dongle\n\n```\n$ cat /etc/udev/rules.d/zwave.rules\nACTION==\"add\", SUBSYSTEM==\"tty\", ATTRS{idVendor}==\"10c4\", ATTRS{idProduct}==\"ea60\", SYMLINK+=\"zwave-dongle\"\n# check permissions of /dev/zwave-dongle\n$ sudo docker run --device /dev/zwave-dongle:/dev/zwave-dongle …\n```\n\n## mount `/proc/device-tree`\n\nRequired by `Adafruit-DHT`:\nhttps://github.com/adafruit/Adafruit_Python_DHT/blob/a609d7dcfb2b8208b88498c54a5c099e55159636/source/Raspberry_Pi_2/pi_2_mmio.c#L43\n\n`/proc/device-tree` is a symlink to `/sys/firmware/devicetree/base`.\n\nHowever, `docker run -v /sys/firmware/devicetree/base:/sys/firmware/devicetree/base:ro …` is ineffective.\n\nDocker masks `/sys/firmware`:\nhttps://github.com/moby/moby/pull/26618\nhttps://github.com/docker/docker-ce/blob/v19.03.5/components/engine/oci/defaults.go#L127\n\nEvil workaround:\n```sh\n# start container without explicitly mounting devicetree\n$ sudo docker run --name home_assistant …\n# umount shadowing tmpfs\n$ sudo nsenter --target $(sudo docker inspect --format={{.State.Pid}} home_assistant) --mount umount /sys/firmware\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffphammerle%2Fdocker-home-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffphammerle%2Fdocker-home-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffphammerle%2Fdocker-home-assistant/lists"}