Debian is not known to have the newest packet versions.
Also complexer application as homeassistant require containers as docker.
To get out of this dependency nightmare containers as docker can be used to supply all what is depends with the application.
see https://docs.docker.com/engine/install/debian/.
This is done by adding the docker repository.
sudo apt-get update as usual work with the newest things
Add Docker's official GPG key: sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
Add the repository to Apt sources:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update to get aware of the things above
then install docker sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
To have docker running as none root,
sudo usermod -aG docker $USER add the user to the docker group
newgrp docker to let the shell know about it. Alternatively logout and login.
Logout and login again and run docker run hello-world
The command looks for the hello world container on the raspberry and if not found it down loads it from the docker hub.
As it already could be noted when docker runs it checks locally if it finds a container if not it tries to download it from the Internet. docker ps shows what docker is running.
The docker applications are stored once under /var/lib/docker.
The -v option behaves as a link between system and the docker container.
As example -v /opt/docker/homeassistant:/config creates a link between the systems /opt/docker/homeassistant directory and the dockers config