本帖最后由 cuileiyy 于 2022-2-4 13:38 编辑
基于Docker安装的HASS升级
拉取最新镜像
docker pull homeassistant/home-assistant:latest停止容器docker stop [容器ID]
## 例如
root@hass:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e9bf23f4ba60 homeassistant/home-assistant:latest "/init" 4 weeks ago Up 4 weeks home-assistants
root@hass:~# docker stop e9bf23f4ba60
e9bf23f4ba60
删除容器
docker rm [容器ID]
## 例如
root@hass:~# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e9bf23f4ba60 dd42f613ab5e "/init" 4 weeks ago Exited (0) 8 minutes ago home-assistants
root@hass:~# docker rm e9bf23f4ba60
home-assistants
启动最新的镜像
docker run -d --restart=always --name="home-assistants" --privileged=true -e TZ=Asia/Shanghai -v /data/homeassistant/config:/config --net=host homeassistant/home-assistant:latest
删除老的镜像
root@hass:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
homeassistant/home-assistant latest 149c6cb3c7b0 2 hours ago 1.08GB
homeassistant/home-assistant <none> dd42f613ab5e 4 weeks ago 1.07GB
root@hass:~# docker rmi dd42f613ab5e
Untagged: homeassistant/home-assistant@sha256:81d381f5008c082a37da97d8b08dd8b358dae7ecf49e62ce3ef1eeaefc4381bb
Deleted: sha256:dd42f613ab5e08e2c86213637a35a0236fe92da10c125cbb1e534ae8f3a30e06
Deleted: sha256:150068301e804a0e7ca227b0627e3ba6b0e58e773a4ecf8d3374f233c42625be
Deleted: sha256:d3b72bd7807716b3ca3527457901d411a44718ada5a17c3c4491f5c2f0780564
Deleted: sha256:b2cab2c340329d3fef6199a2771b78ee5960d56ace741bd22676b7dc445f43bc
Deleted: sha256:aa44e26ebf7696e3b296e4b245440aea746ec7f9528e3904df55b0294467f71f
Deleted: sha256:1c905f9de49a5df4845fff4c3ff53b9309e2af1c7aa8f41476018209491e485b
Deleted: sha256:68746c3716019882370cf67936c233ac9aeec0d0bc73a0947f7ddd017fc43a0e
Deleted: sha256:2bde53d5333eb04d25a7a64cdfbdc01094db80d4a6838d8e85786469007d655f
Deleted: sha256:a000359b80091e5816625ea577c8eac0d49f94c12b26fab5abe19ac5157a0a1b
Deleted: sha256:db8fc40bd21bbbf6e7859e2f109cc8ffa7ce1c0320eedc8744b6d6fa27df0ab8
Deleted: sha256:e6117062f12806812644982f0a6ff1ac8031e94d0813bea7159a97b4435d7ad3
|