DOCKER_HOST_IP Enironment Variable#180
Conversation
# Conflicts: # Dockerfile
…he IP address the files. Also added two shell scripts to make it easier to start producers and consumers inside kafka container.
|
Hi @hmusavi, thanks for the PR. Could you provide a bit more context on the issue this is solving and perhaps the use cases that it addresses. I'm just trying to get my head around this change. The |
# Conflicts: # Dockerfile # README.md # broker-list.sh
|
My goal was to make the whole configuration independent of the user environment so one can use it out of the box without having to modify the docker-compose or anything. All one has to do is define the right environment variable (or a .env) file and use the image straight from DockerHub even. For instance, instead of having the local ip address of the host in the docker-compose, if we have use an environment variable, it achieves that goal. Then I ended up using the same variable in a couple of scripts as well. Now that we have it, why not. Additionally, I just added the two kafka console scripts to the docker image as well because I found them quite handy having them around in the image. I use them all the time for troubleshooting and figured other may find them useful too. So, as you can see, these are very trivial changes that I have deployed in my fork. If you approve and merge them, then I won't have to keep a separate fork. I can use your image out of the box. But if you feel that these aren't necessary, I understand ; feel free to ignore them. It won't hurt my feeling :-) |
Added DOCKER_HOST_IP environment variable to docker_compose file to avoid hard-coding them and not require changes to yml file for user environment. Also added two convenience scripts to the kafka image.