Closed Magke closed 2 years ago
I don't really understand why this happens but I do know how to cure it.
If we go back in time to gcgarner/IOTstack:
docker
was installed using the Docker "convenience script"; anddocker-compose
was installed using apt
.Thereafter, both docker
and docker-compose
were updated by apt
.
That approach was inherited by SensorsIot/IOTstack.
The problem was that the docker-compose
installed by apt
was never actually updated during the evolution of Buster and became increasingly out-of-date. The workaround was to delete the apt
version and use pip3
instead:
$ sudo apt -y remove docker-compose
$ sudo pip3 install -U docker-compose
Next came "modern" docker-compose which is installed by downloading a platform- and version-specific compiled binary from docker/compose/releases and copying it to the right places.
Depending on when you started with IOTstack and how long it has been since you last rebuilt your Raspberry Pi, you can have various versions and combinations of docker
and docker-compose
installed on your Pi.
The trigger conditions for getting a version number like "20.10.5+dfsg1" seem to be:
docker-compose
installed by apt
.docker-compose
recently being updated by apt
, possibly as a side-effect of upgrading to Bullseye, or possibly the result of something that happened behind the scenes related to Bullseye that affected Buster.How or why apt
updating docker-compose
affects the version number of docker
is not clear. However, the menu does not expect version numbers with a "+" in the middle so the parsing algorithm gets it wrong and decides the installed version needs to be upgraded - which it can't be.
The solution is to get rid of both docker
and docker
compose, and then re-install them properly.
There is a wrinkle, though. If you're also running Supervised Home Assistant (also known as Home Assistant Core and hass.io) then removing docker
causes Home Assistant to stop working. The way Supervised Home Assistant gets installed has also gone through a few changes and the IOTstack menu methods no longer work. In the case of "old menu", the HA script has disappeared. In the case of "new menu", an intermediate script (nothing to do with IOTstack) is broken and the author seems to have given up. There are some pull requests pending to remove Home Assistant from the IOTstack menu.
To be clear, this does not affect the standalone Home Assistant container. That still works just fine.
If you read the material here it explains how to uninstall Supervised Home Assistant (if you are running it), docker
and docker-compose
, and then re-install the components correctly.
To be clear, Supervised Home Assistant can be installed alongside IOTstack but the IOTstack menu can't do it any more.
Anyway, if you follow those instructions, everything will be reinstalled correctly, the menu will be happy and won't complain about "20.10.5+dfsg1", and the problem will just go away.
I hope this helps.