论坛风格切换切换到宽版
  • 65阅读
  • 10回复

docker [复制链接]

上一主题 下一主题
离线北斗星

只看该作者 10楼  发表于: 2025-05-17
https://hub.docker.com/



Support Info


  • Shell access whilst the container is running:


    docker exec -it homeassistant /bin/bash

  • To monitor the logs of the container in realtime:


    docker logs -f homeassistant

  • Container version number:


    docker inspect -f '{{ index .Config.Labels "build_version" }}' homeassistant

  • Image version number:


    docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/homeassistant:latest


Updating Info


Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.
Below are the instructions for updating containers:

Via Docker Compose


  • Update images:
    All images:


    docker-compose pull

  • Single image:


    docker-compose pull homeassistant

Update containers:

  • All containers:


    docker-compose up -d

  • Single container:


    docker-compose up -d homeassistant

You can also remove the old dangling images:


docker image prune

Via Docker Run


  • Update the image:


    docker pull lscr.io/linuxserver/homeassistant:latest

  • Stop the running container:


    docker stop homeassistant

  • Delete the container:


    docker rm homeassistant

  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)

  • You can also remove the old dangling images:


    docker image prune


Image Update Notifications - Diun (Docker Image Update Notifier)



[!TIP] We recommend Diun⁠ for update notifications. Other tools that automatically update containers unattended are not recommended or supported.


Building locally


If you want to make local modifications to these images for development purposes or just to customize the logic:


git clone https://github.com/linuxserver/docker-homeassistant.gitcd docker-homeassistantdocker build \--no-cache \--pull \-t lscr.io/linuxserver/homeassistant:latest .
The ARM variants can be built on x86_64 hardware and vice versa using lscr.io/linuxserver/qemu-static


docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.
快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
上一个 下一个