Skip to content

Conversation

ukkopahis
Copy link

@ukkopahis ukkopahis commented Feb 15, 2022

A docker version like 20.10.5+dfsg1 wasn't recognized. Now strips all '+' and '-' postfixes.

Fixes #447
Fixes #496

@Paraphraser
Copy link

Paraphraser commented Feb 15, 2022

This is probably a good idea but I'm not 100% convinced it's the right way to go. It's the correct solution, technically, but I'm worried it masks a deeper problem. The + suffix appears to be the result of installing a (somewhat obsolete) version of docker-compose using apt (which is how IOTstack menu and install scripts have done it since gcgarner days).

How installing docker-compose can cause docker to get a + suffix version number is something I don't understand but we can put a pin in that.

In and of itself, having a somewhat obsolete docker-compose is not too big of a problem ("user's system, user's rules"). Where I start to get a bit worried is what the change to docker's version number implies. Is it just confined to the version number or did other things get changed too?

Where I start to get really worried is what happens if you then try to upgrade to modern docker-compose because, once docker gains a + suffix, uninstalling the apt version of docker-compose breaks docker and you basically have to nuke everything (and if Home Assistant is part of the deal, that has to be nuked too).

I've been thinking of the + suffix as akin to a canary in a coal mine. Changing the code to ignore the suffixes feels a bit like not paying attention to the canary.

@ukkopahis
Copy link
Author

Ok, so we should add a version-check for docker-compose version as required. But that is a separate issue.

Debian apt installs docker version with a postfix. E.g. "20.10.5+dfsg1"
Ignore this when checking for version.

Fixes SensorsIot#496
Fixes SensorsIot#447
@ukkopahis ukkopahis force-pushed the fix-docker-version-check branch from 5f8ab26 to e0bfa12 Compare February 15, 2022 13:05
@ukkopahis ukkopahis marked this pull request as ready for review February 18, 2022 14:54
@ukkopahis ukkopahis mentioned this pull request Feb 19, 2022
@Slyke Slyke merged commit c5e5afb into SensorsIot:master Feb 23, 2022
@ukkopahis ukkopahis deleted the fix-docker-version-check branch April 14, 2022 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

menue thinks docker 20.10 is less than 18.2.0 Docker version is currently 20.10.5+dfsg1 which is less than 18.2.0 error message

3 participants