本镜像每日更新,可用tag有
stable
、latest
、dev
及月度版本如2024.9
预装集成仅针对新安装的HA,如已有
custom_components
目录则不会执行预装。
https://www.home-assistant.io/installation/linux#install-home-assistant-container
docker run -d \
--name homeassistant \
--privileged \
--restart=unless-stopped \
-e TZ=Asia/Shanghai \
-v /PATH_TO_YOUR_CONFIG:/config \
-v /run/dbus:/run/dbus:ro \
--network=host \
hacn/hacn:stable
https://www.home-assistant.io/installation/linux#docker-compose
services:
homeassistant:
container_name: homeassistant
image: hacn/hacn:stable
volumes:
- /PATH_TO_YOUR_CONFIG:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
environment:
- TZ=Asia/Shanghai
- ALWAYS_INSTALL=false # 可选,如果为true,每次启动都会逐个安装预装集成
restart: unless-stopped
privileged: true
network_mode: host