Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using compose as library #9602

Closed
prskr opened this issue Jun 27, 2022 · 4 comments
Closed

Using compose as library #9602

prskr opened this issue Jun 27, 2022 · 4 comments

Comments

@prskr
Copy link

prskr commented Jun 27, 2022

Hey,

there is currently a discussion in testcontainers/testcontainers-go#425 whether to use the Go API of docker-compose to replace the current process invocation version.

The most important question right now is: is github.com/docker/compose/v2/pkg or github.com/docker/compose/v2/cmd (or both) meant to be used as library and therefore semantically versioned regarding their public API?

We couldn't find any public documentation and were hence wondering if this is a supported scenario or if we'd be 'on our own' and we'd have to expect breaking API changes every now and then.

Is there any plan/information?

Thanks in advance

@ulyssessouza
Copy link
Contributor

ulyssessouza commented Jun 28, 2022

Hello @baez90.
TLDR: No.

For now Docker Compose is not designed as a library and we don't support it as such. So no guarantees on public functions stability. We will open an issue on the roadmap to discuss about this possibility.

For now, maybe just using Compose Go would fulfil your needs.

@prskr
Copy link
Author

prskr commented Jun 28, 2022

Mostly yes, but while doing a prototype I also used pkg/api and pkg/compose to actually ramp up containers without having to take care of the interpretation of a Project.

So I totally understand that it's of no interest to you to guarantee a stable API as this makes maintenance of this project so much easier 😄 but...out of curiosity: are there some aspects still under heavy development? I'm just wondering if a proper facade to decouple the public API of testcontainers-go of the one of compose could be enough to gracefully handle breaking changes or are there some fundamental changes to be expected?

Thanks a lot already for your support!

@glours
Copy link
Contributor

glours commented Jul 8, 2022

👋 @baez90
We opened a roadmap issue to see if this is something needed by the community

@ndeloof
Copy link
Contributor

ndeloof commented May 4, 2023

closing this issue, we will collect feedback on docker/roadmap#387

@ndeloof ndeloof closed this as completed May 4, 2023
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

No branches or pull requests

4 participants