[GitHub CI]: `docker-compose` Not Found Error for Python

This has suddenly cropped up today, and I am not sure why, since the code and the OS version haven’t changed.

When trying to call the Python test-runner during a PR check, the CI failed with docker-compose: command not found. Re-running the job tossed the same error.

In a bit of googling, I found this discussion, which pointed to this notice. But we haven’t changed the Ubuntu version on this, and we’ve certainly run the CI many many times since April.

I am going to try and update things with the script, but I have forgotten how to test it. Any tips?

Update: Merged this, and things seem OK … but this PR needed the changes pulled in from main to have things pass.

I ran into this same issue lately. It sort of makes sense to use docker compose, but it’s weird that docker-compose just isn’t available :)

This has changed kind of recently, since the way the command was designed has changed. It is now proper (and will break using the dash) to use docker compose instead.

GitHub announced this change to their Actions images for a year or so. They do change the Docker images every ~2 weeks without changing versions and sometimes there are breaking changes like this. It’s their policy, so we have to live with it.

Docker did not provide updates for docker-compose since even more years and replaced the tool with docker compose a few years ago. It is generally safe to simply replace the dash, but there are edge cases. E.g. compose is a plugin and must be installed separately, which is not always the case in availble images on Docker Hub. It’s available for free at the time of writing.

Oh, certainly. I think it was probably too easy to ignore any depreciation warnings (although it’s not clear there were any where I’d see them). So it had to break for me to get off my arse and change things. Fortunately, it was straightforward.

I did read that in passing in the first thread, but then replacing the dash “just worked”.

:thinking: I should at the very least annotate the YAML file with a note to my (or someone else’s) future self… :sweat_smile: . But maybe also make an explicit docker compose install in any place where I’ve used docker compose from a Docker Hub image… :smile:

It really is easy to miss announcements like this: GitHub-hosted runner images deprecation notice: Docker Compose v1 - GitHub Changelog There are just too many different ones coming in.