2472: Add support for container_name in docker-compose file
Closes: #2472
This PR adds support for container_name in the docker-compose file by pulling the container names out in ParsedDockerComposeFile and adding some additional logic in DockerComposeContainer
This is my first time contributing to the repo, so any feedback is welcomed.
I'm not really sure about this failing CI. Any suggestions? I just rebased with master, and it wasnt failing before the rebase
@reggiemcdonald I just triggered a re-run, there was some issue with downloading Gradle stuff
@bsideup thanks!
@rnorth @bsideup @kiview having this feature is a blocking issue for me is there a plan to merge this change in?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.
Thanks @reggiemcdonald great work
Is this still looking to be merged in? Currently the latest version (as of writing this) is 1.15.2 and this issue is still casuing problems.
Hi @reggiemcdonald, thank you! Do you have any plan on merging it @rnorth?
@reggiemcdonald Can this get merged?
Any update on landing this?
Hello. I had the same issue recently, I would be grateful if this PR could be merged. Thanks for the hard work !
@rnorth @bsideup @kiview Can this PR be merged, please?
Is there any news about this PR?
@bsideup or @reggiemcdonald , what's the status here? If you don't have time or energy here, I'm happy to take over the PR
Would also love to see this merged, and can take it over if someone needs to. Status?
Thanks for the PR @reggiemcdonald, but unfortunately we have to close it. Mainly, there are 2 reasons why we don't want to add support for container_name to DockerComposeContainer:
- It requires us to further parse the Docker Compose file and its format has been slightly volatile in the past. So we generally want to avoid further semantically parsing the Docker Compose file, independent from the actual
container_namekey. - Using
container_namewould break existingDockerComposeContainerfeatures, like scaling. - As the Testcontainers library, we want to avoid the usage of fixed things, such as ports, names, etc., since those introduce the anti-pattern of integrated tests that can fail depending on the state of the environment in which they are running.