-
Notifications
You must be signed in to change notification settings - Fork 292
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
Bug: kafka testcontainer does not support adding a network #637
Comments
seems related to #633 can you share more of the use case, i understand this is a complete reproduction but i am also kind of curious the use case, whether in python form or a general description - I do not use this feature myself so I want to understand a bit better. thanks. |
Thanks for the quick turnaround! The use case is when chaining several containers (in my case telegraf and kafka). Having a network alias makes it possible to do that without having to do complicated file generation based on actual IPs: I can just point telegraf to |
🤖 I have created a release *beep* *boop* --- ## [4.7.2](testcontainers-v4.7.1...testcontainers-v4.7.2) (2024-07-15) ### Bug Fixes * Add container Trino ([#642](#642)) ([49ce5a5](49ce5a5)), closes [#641](#641) * **core:** Improve private registry support (tolerate not implemented fields in DOCKER_AUTH_CONFIG) ([#647](#647)) ([766c382](766c382)) * **kafka:** add a flag to limit to first hostname for use with networks ([#638](#638)) ([0ce4fec](0ce4fec)), closes [#637](#637) * **modules:** Mailpit container base API URL helper method ([#643](#643)) ([df07586](df07586)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Describe the bug
KafkaContainer.tc_start only allows containers to have a single IP, so it is not possible to add a network
Changing
listeners = f"PLAINTEXT://{host}:{port},BROKER://$(hostname -i):9092"
tolisteners = f"PLAINTEXT://{host}:{port},BROKER://$(hostname -i | cut -d' ' -f1):9092"
fixes itException in the container logs:
To Reproduce
Runtime environment
[[package]]
name = "testcontainers"
version = "4.7.1"
The text was updated successfully, but these errors were encountered: