How to run multiple Docker Containers in different terminals using Docker compose or with Shell?
I have to pull
docker image from Docker Hub and start running multiple peers as containers.
now, I am manually opening terminal and executing my docker run command on downloaded image but I am planning to automate this process like if I/user want 2 peers to run then I should be able to provide IP Address and Port information to Docker run command and start these peers in different terminals without manual step.
After executing these commands I should be able to store these IP address and port numbers in a JSON file further transactions.
Could you please help me!!! Thanks!!
One Solution collect form web for “How to run multiple Docker Containers in different terminals using Docker compose or with Shell?”
Got quick solution for the above problem.. Below is the command I have applied
docker run -d IMAGE NAME /bin/bash above command runs the container in background process. Also, I am taking network credentials by applying
docker inspect <Container Id>