Update to 2024.4.2

I have HA Core running in a docker.
In order to update I use the following commands:
docker stop home-assistant
docker rm home-assistant
docker pull Package home-assistant · GitHub
and then the following command to restart
docker run -d --name=“home-assistant” -e “TZ=Europe/Rome” -v “~/homeassistant:/config” -v “/run/dbus:/run/dbus:ro” --net=host --restart=always Package home-assistant · GitHub
Since now it was all ok, but with the last release (2024.4.2) I got the following message at the end:
docker: Error response from daemon: create ~/homeassistant: “~/homeassistant” includes invalid characters for a local volume name, only “[a-zA-Z0-9][a-zA-Z0-9_.-]” are allowed. If you intended to pass a host directory, use absolute path
What has changed?
Please, help me! Thanks

This is possibly referring to your use of ~. Perhaps replace it with the full path and try it then?

As an aside, you don’t need the first 2 commands so you can just pull, up (and then prune).

Also, you can put the pull info into a compose.yaml file and then you don’t need to remember it/write it every time.

Here’s (the revelant) part of mine for comparison (on a RPi):

name: "smarthome"
services:
  homeassistant:
    container_name: homeassistant
    image: ghcr.io/home-assistant/home-assistant:stable
    volumes:
      - ./homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    environment:
      - TZ=Europe/London
    network_mode: host
    privileged: true
    restart: unless-stopped

The command is then simply docker compose up -d which takes all the info from the compose.yaml file.
The prune* command I use is: docker system prune --volumes -f to remove all the no-longer-needed images etc etc.

I mention all this in case there was typo causing your problem.

[edit: Typo*]

Confirm that with the same problem I have solved replaced the ~ with the complete path.

Thanks for the suggest.

1 Like