Closed champialex closed 2 weeks ago
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 kafka:9092
.
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"