With the previous implementation, I get the following error. Technically, this file should also support 2+ versions of docker-compose.
FAIL: Expected minimum docker-compose version to be 1.19.0 but found Docker Compose version v2.2.3
This is because, the command docker-compose --version in 1+ and 2+ returns two different formats.
in version 1+ --> docker-compose version 1.29.2, build 5becea4c
in version 2+ --> Docker Compose version v2.2.3
Solution
Proposing a way to extract the version with grep. This works for version numbers with 2 digits. Please comment back, if you think the version numbers can also be 3 digits.
Issue:
With the previous implementation, I get the following error. Technically, this file should also support 2+ versions of
docker-compose
.FAIL: Expected minimum docker-compose version to be 1.19.0 but found Docker Compose version v2.2.3
This is because, the command
docker-compose --version
in 1+ and 2+ returns two different formats.docker-compose version 1.29.2, build 5becea4c
Docker Compose version v2.2.3
Solution
Proposing a way to extract the version with
grep
. This works for version numbers with 2 digits. Please comment back, if you think the version numbers can also be 3 digits.