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.

  • Spring Boot Application issue with rabbitmq in docker
  • How make a cluster of CoreOS on my local infrastructure?
  • How to run script file(.sh file) inside Dockerfile? [closed]
  • Docker container connect to host DocumentDB emulator
  • docker build in run time or docker compose from images
  • Docker PHP permissions
  • 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!!

  • Is there any issues with creating lots of Docker tags for Continuous Delivery?
  • Can't install package on alpine though I can see it in the ui
  • How to achieve build isolation and caching simultaneously?
  • How to ship java based web application in AWS cloud using docker
  • Why is my Redis Python setup inserting values multiple times when a command is called once?
  • Unable to connect to tomcat running in Docker (Connection refused)
  • 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>

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.