Skip to content

[FEAT] Duplicate Storage Usage in Home Assistant Docker Installation #125

@danielalcalde

Description

@danielalcalde

Is this a new feature request?

  • I have searched the existing issues

Wanted change

It appears that Docker has two identical copies of the Home Assistant installation, leading to the container using nearly twice the necessary storage.

docker ps --size | grep homeassistant 
91e0624d0bb7   lscr.io/linuxserver/homeassistant:latest   "/init"                  26 hours ago   Up 6 hours             0.0.0.0:8123-8124->8123-8124/tcp, :::8123-8124->8123-8124/tcp
                                       homeassistant           1.51GB (virtual 3.21GB)

Reason for change

Cause

The issue seems to stem from the following line:

mv "${PY_LOCAL_PATH}.bak" "${PY_LOCAL_PATH}"

This operation results in a full copy of most image contents, increasing the final installation size by approximately 1.7GB. This step aims to change the ownership of the Python environment.

Suggested Improvement

Would it be possible to achieve the same result, running python with user ABC, in a more storage-efficient way?

Thanks for your time and consideration!

Proposed code change

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions