Answer the question
In order to leave comments, you need to log in
How to run the same docker-compose multiple times?
Hello!
I'm trying to implement the following scheme of work:
But I can't set up docker-compose.yml so that I could run multiple images with the same set of services. With each new start in CI, the machines are recreated:
Recreating ubuntu_1 ... done
Starting nginx ... done
Recreating redis_1 ... done
Recreating php_1 ... done
Answer the question
In order to leave comments, you need to log in
This is done via a prefix - https://stackoverflow.com/questions/33045358/docke...
Docker compose is well suited for local use. In all other cases, its advantages are completely unobvious.
Are the services already built and running in the registry? Then just pull from the registry once and start all the containers in batches, each time generating a random port and network for a set of containers.
But how are you going to control such a pile of containers? Maybe you should look away, for example, Docker Swarm?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question