Skip to content

Add support for docker compose v5. See https://docs.docker.com/com… - #342

Merged
paulholden merged 2 commits into
moodlehq:mainfrom
tmas0:Support_docker_compose_v5
Dec 17, 2025
Merged

Add support for docker compose v5. See https://docs.docker.com/com…#342
paulholden merged 2 commits into
moodlehq:mainfrom
tmas0:Support_docker_compose_v5

Conversation

@tmas0

@tmas0 tmas0 commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Hi,

This pull request contains the minimum and necessary changes to add support for Docker Compose v5. See the releases notes: https://docs.docker.com/compose/releases/release-notes/

Bests

@scara

scara commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Hi Toni,
thanks for your contribution!

Since Docker moved from v2, 2.40.3 on 2025-10-30, directly to v5, 5.0.0 on 2025-12-02, I'd suggest to revert the logic and search for v1 and changing the message accordingly: it looks to me better in terms of future proof.
What do you think?

Thanks in advance,
Matteo

@tmas0

tmas0 commented Dec 5, 2025

Copy link
Copy Markdown
Contributor Author

Hi Matteo,

There is no problem to reverting, but docker compose versions starts at 0, so it's the same thing, we check it's the version 0 or 1, if the problem is OR comparison.

Bests

@paulholden

Copy link
Copy Markdown
Member

Thanks @tmas0 - your original change is working well for me locally too

Are we sure about inverting the logic? The current conditional also appears to be checking whether it's available at all ( || true)

@tmas0

tmas0 commented Dec 5, 2025

Copy link
Copy Markdown
Contributor Author

Hi Paul,

IMHO, I would leave it as it is.

Bests

@scara

scara commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Hi Toni,

IMHO, I would leave it as it is.

In that case, I'd fix the message too i.e. something like echo "Compose ${ver} is not available in Docker CLI, falling back to use docker-compose script".

HTH,
Matteo

@tmas0

tmas0 commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

Hi Matteo,

Included, I saw that your contribution was good.

Bests

@paulholden

Copy link
Copy Markdown
Member

Hi Matteo,

Included, I saw that your contribution was good.

Bests

Cheers, can you please squash the commits?

@NeillM

NeillM commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

If we make the regular expression:

^v?([2-9]|1[0-9])

I think it should match any version apart from version 1; i.e. so it will not fail if they go to version 6, or version 10 for example.

See it in action

@paulholden
paulholden merged commit 450a842 into moodlehq:main Dec 17, 2025
3 of 4 checks passed
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.

4 participants