Repository navigation
Closed
Description
Motivation
- Docker Compose v2 offers more features that we can make use of and create a better developer experience.
- Docker Compose v1 will no longer be receiving updates after June 2023 so we should deprecate the usage of it
Notable features
docker compose ps --format jsoncan help us shortcut the effort on many useful things- Update Docker Compose call when launching a Docker Compose command #226 is trivial after this and fairly safe to "prefer the plugin over the standalone"
- Compose should use
compose_file_name=[]orNoneby default #259 may have been fixed in v2 but any fixes might be better implemented for v2 - Add a wait_for_healthcheck method to DockerCompose #241 is more trivial to implement once we have the json format available to us
- Make DockerCompose.get_service_info public #239 is also trivial as well as giving us a much richer set of data, including the easy shortcut to get the container ID and allow
testcontainersto start/stop these containers
The challenges
- dual support of v1 and v2:
- legacy support means tougher feature parity and more testing needed for something that is in fact deprecated
- I'd like to drop it, but this means compose contains a breaking change
- so what is the next major release for
testcontainers-python? 🙂
- docker compose v2 is not a python package (it's written in golang and I'm not sure I'm up for making a binding for this)
- so need to agree on a sensible way to check this on instantiation of a
DockerComposeobject. - Not hard, just needs some reviews and is a breaking change
- so need to agree on a sensible way to check this on instantiation of a
Final thoughts
I'm happy to pick this up, in fact I have a local copy with a bunch of goodies, just need some community support in how to introduce this change.
Also since this is likely a breaking change for the compose plugin, your thoughts on how to version this would be very welcome @tillahoffmann 🙏
Reacted by mo, Luca Dalla Valle, Sergio Aparicio, Ruairí O'Brien, David Ankin and hsm207
Activity
antoine-de commentedon Sep 28, 2023
This would be a really nice feature now that Docker compose v1 is EOL 🙏
alexanderankin commentedon Jan 15, 2024
here is how testcontainers-java does it
e.g. https://github.com/testcontainers/testcontainers-java/blob/main/core/src/main/java/org/testcontainers/containers/DockerCompose.java
propose compose implementation re: testcontainers#306, testcontainers…
feat(compose)!: implement compose v2 with improved typing (#426)
alexanderankin commentedon Mar 6, 2024
merged in #426 , released in #330
fix: on windows, DockerCompose.get_service_host returns an unusable "…
fix: on windows, DockerCompose.get_service_host returns an unusable "…