Multiple instances-containers of elasticsearch on docker

trying to run multiple copies of elastic search using the following commands.

docker run -d -p 9200:9200 -p 5601:5601 nshou/elasticsearch-kibana

docker run -d -p 9202:9200 -p 5602:5601 nshou/elasticsearch-kibana

after running these I can access at ports 9200 and 9202 (and 5601 and 5602).

But I seem to get errors when I run the python script below. Also, I want to run the script below separately for each of the docker instances (containers?), I want to run slightly different versions of the python script actually. What do I need to do to set this up?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

when I try to post the code on this forum the submit button here does not work