Hi,
I would like to run multiple instances of the same docker module at the same time. Is this possible?
Cheers,
Steve
Share and learn in the Docker community.
Hi,
I would like to run multiple instances of the same docker module at the same time. Is this possible?
Cheers,
Steve
What do you mean by “module”?
You can run multiple containers using the same image:
# launches a container that will sleep in the background for 5 minutes:
docker run --rm -ti ubuntu sleep 300 &
# launches a second container using the same image:
docker run --rm -ti ubuntu sleep 300 &
To verify this, list the running containers with
# list all running containers with the images they were launched from
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cb031bf37526 ubuntu "/bin/bash" 3 seconds ago Up 2 seconds gifted_newton
3e774091d10a ubuntu "/bin/bash" About a minute ago Up About a minute affectionate_brahmagupta