Skip to content

Conversation

@tmas0
Copy link
Contributor

@tmas0 tmas0 commented Dec 4, 2025

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
Copy link
Contributor

scara commented Dec 4, 2025

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
Copy link
Contributor Author

tmas0 commented Dec 5, 2025

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
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
Copy link
Contributor Author

tmas0 commented Dec 5, 2025

Hi Paul,

IMHO, I would leave it as it is.

Bests

@scara
Copy link
Contributor

scara commented Dec 5, 2025

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
Copy link
Contributor Author

tmas0 commented Dec 9, 2025

Hi Matteo,

Included, I saw that your contribution was good.

Bests

@paulholden
Copy link
Member

Hi Matteo,

Included, I saw that your contribution was good.

Bests

Cheers, can you please squash the commits?

@NeillM
Copy link
Contributor

NeillM commented Dec 9, 2025

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