Updating with docker on Raspberry Pi

I am running Home Assistant on a Raspbian Lite (Buster) with Docker. It is running fine, starts with the system and generally the system is running fine.
However, for some reason I don’t understand, it doesn’t seem to update well. I am following the updating instructions, stopping Home Assistant and running:
pi@hass1:~ $ docker pull homeassistant/raspberrypi3-homeassistant:latest
This goes smoothly too and ends up saying:
Status: Downloaded newer image for homeassistant/raspberrypi3-homeassistant:latest
Then I start Home Assistant again, visit /developer-tools/info to verify… And there, it still says it is running the version I installed cleanly, 0.102.3. At the time of posting this, the latest version is six days old 0.104.3.
What is happening here? Is the info page lying to me, or am I getting something wrong? How can I sort this out?
Thanks!

Could you please list all docker commands you are running?

Basically you have to run a docker run ... after the docker pull ... otherwise the container isn’t recreated and you are still running the previous one.

How did you initially start the homeassistant container? Using docker-compose or docker run...

Hi, thanks for answering! I start the container with a systemd unit containing:

ExecStart=/usr/bin/docker run --name=home-assistant -v /home/pi/homeassistant/:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant

So that is what I ran after the docker pull.
Initially I setup using the instructions, so docker run.

is it working when you change the image in your systemd unit to homeassistant/raspberrypi3-homeassistant ?

Tried that. Looks better! Now I get:

Home Assistant 0.105.0.dev20200127

frontend: 20191119.6 - latest

further down the page, under System Health:
version 0.102.3

Is this to be expected, or is there something else needing tweaking?
Should I clean up images that are not being used? I am not very proficient with Docker. This is what I see:

alfredo@hass1:~ $ sudo docker image ls
REPOSITORY                                 TAG                 IMAGE ID            CREATED             SIZE
homeassistant/raspberrypi3-homeassistant   latest              73a396617f49        14 hours ago        1GB
homeassistant/raspberrypi3-homeassistant   <none>              4534909e8991        4 days ago          1GB
homeassistant/raspberrypi3-homeassistant   <none>              3eb528c61c62        6 days ago          1GB
homeassistant/raspberrypi3-homeassistant   <none>              3b68d42844dc        2 weeks ago         1GB
homeassistant/raspberrypi3-homeassistant   <none>              91d1e49060e3        2 weeks ago         993MB
homeassistant/raspberrypi3-homeassistant   <none>              5926c741efcb        5 weeks ago         998MB
homeassistant/raspberrypi3-homeassistant   <none>              d0b998e7cb89        8 weeks ago         1.01GB
homeassistant/home-assistant               latest              388c76ead5ec        8 weeks ago         1.01GB
homeassistant/home-assistant               stable              388c76ead5ec        8 weeks ago         1.01GB
homeassistant/raspberrypi3-homeassistant   stable              6b93aa18f3c9        2 months ago        998MB

I don’t know where the version numbers are taken from. Maybe you could start over with a fresh installation, the basic idea behind containers :wink:

Docker uses a layering technique to store images and the usage in containers which is described here: https://docs.docker.com/storage/storagedriver

You can remove unused images for disk space saving using the command docker image prune
Please read the official docs for more info https://docs.docker.com/engine/reference/commandline/image_prune

Thanks, I’ll study some Docker starting with the pointers you kindly linked.