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

Minimal docker compose support #407

Conversation

IgorLaborieWefox
Copy link

Add a minimal docker compose support.
See #59

The code is behind the compose feature.
It requires having a docker compose v2.x.x installed

@thomaseizinger
Copy link
Collaborator

Thank you for opening this PR!

Unfortunately, I don't have the bandwidth at the moment to shepherd this. I have not put a lot of thought into how docker compose support should look like from an API PoV.

Given that it is mostly additions, I don't expect many merge conflicts here so I'll just leave this open until either myself or another maintainer has the bandwidth to look into this.

I hope you understand :)

self.pull().expect("Failed to execute docker compose pull");

let mut cmd = self.cmd();
cmd.args(["up"]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some sort of up policy to handle --no-recreate --detach


fn pull(&self) -> Result<(), std::io::Error> {
let mut cmd = self.cmd();
cmd.args(["pull"]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of not self.inherit_io, we need to prevent logs like it's done in the up()

@dandxy89
Copy link

Are there any plans to review this?

@thomaseizinger
Copy link
Collaborator

Are there any plans to review this?

I am afraid I don't have the bandwidth to review this at the moment. If somebody can write up a high-level design on how this is meant to work, I can give some input :)

@IgorLaborieWefox
Copy link
Author

Already done in rustainers.

@longdt
Copy link

longdt commented Mar 7, 2024

@IgorLaborieWefox I like your code so much. It's great, can I use this PR code for my new crate. I'm planning release a crate for dockers compose test

@ndaWefox
Copy link

ndaWefox commented Mar 7, 2024

@longdt I suggest you have a look at rustainers. It's implemented by the same team in a similar approach, maybe you can use it as is :)

@DDtKey
Copy link
Collaborator

DDtKey commented Apr 22, 2024

Just informing everyone interested, we are doing a major revision of testcontainers and adding docker-compose in our plans.

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.

6 participants