You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I really want to be able to use this docker image with https://github.com/testcontainers/testcontainers-rs but the problem is the ports will be randomly mapped for me and it seems like that breaks some things internally. Is it possible to use this container with randomly chosen mapped ports? I can run some exec commands after the fact if that's the only way.
The text was updated successfully, but these errors were encountered:
Hi @SpyMachine , just to understand your idea. You want to be able to set the container internal ports for zookeeper and kafka at runtime. For example being able to change the Kafka port from 9092 to a different port?
Hmm, well so I want to be able to use this as a container when the internal port will be randomly mapped to a host port using the "-P" option for docker run.
I'm not really too sure on the specifics on how one would make that happen.
For example I tried running docker run -p 2182:2181 -p 9093:9092 -e ADVERTISED_HOST=localhost johnnypark/kafka-zookeeper:latest but when I setup a producer and consumer against 9093, I get:
[2019-12-11 07:51:06,228] WARN [Producer clientId=console-producer] Connection to node 0 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
I'd also need the Zookeeper port to be random as well.
Hi, I really want to be able to use this docker image with https://github.com/testcontainers/testcontainers-rs but the problem is the ports will be randomly mapped for me and it seems like that breaks some things internally. Is it possible to use this container with randomly chosen mapped ports? I can run some exec commands after the fact if that's the only way.
The text was updated successfully, but these errors were encountered: