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

Simulating a docker compose flow ? #239

Open
iangregsondev opened this issue Jun 17, 2022 · 2 comments
Open

Simulating a docker compose flow ? #239

iangregsondev opened this issue Jun 17, 2022 · 2 comments

Comments

@iangregsondev
Copy link

Hi,

Sorry for the probably easy question :-) I would like to deploy a number of containers that are related to each other.

I assume the best way of doing this is just to deploy each container manually using bollard and set them to a common network, so they can access each other?

I suppose what I am trying to do is deploy a similar construct to what a docker-compose file would do.

I did see some talk about a stack (which is related to swarm) and wondered if my approach of the manually of creating containers and starting them individually using a common network, is in fact the correct way of doing this?

Do you have an example out of interest, no worries if you don't, I will start to look at it.

Just didn't want to re-invent the wheel if it was something already taken care of.

Coming from a GO background so Rust is still kind of new to me and finding my ground.

Thanks

@fussybeaver
Copy link
Owner

Yeah, you can certainly do this with bollard.. and what you describe is how you would go about it, but bollard is a relatively low-level API client, so you might find something more ergonomic elsewhere.

I think if you look around at libraries that use bollard underneath, you'll find some frameworks that do better plumbing around your use-case. Perhaps the community can pitch in here with some suggestions, I haven't used this one, but it seems popular - https://github.com/testcontainers/testcontainers-rs

@iangregsondev
Copy link
Author

Thanks, yes I took a look at that, it appears its written for testing BUT it does seem to include every that I would need.

I am going to take a closer look.

Thanks!

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

2 participants