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.

  • Inotify don't work on Docker for mac
  • how to run gunicorn on docker
  • docker—run nginx not allways working
  • docker error Unable to locate package cowsay
  • How to set the command history in a Dockerfile
  • How to add an elasticsearch index during docker build
  • 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!!

  • Exposing a WSGI app from a Docker container
  • How to track events on rancher orchestration tool
  • How to exclude some paths when mounting the volume?
  • Volume and data persistence
  • output file after docker image is created through Dockerfile
  • Pass environment variable to a java class using dockerfile
  • 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.