F
F
Fireproof Cockroach2019-03-20 17:18:07
Docker
Fireproof Cockroach, 2019-03-20 17:18:07

How to run the same docker-compose multiple times?

Hello!
I'm trying to implement the following scheme of work:
5c924a1613820076220938.png
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

The task is to get a huge number of docker-compose machines with the same configuration , looking into different folders . There are no problems with paths.
Do I need to start several Dockerfiles with the set of services I need and start them instead of running this stuff through compose?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rustler2000, 2019-03-20
@uonick

This is done via a prefix - https://stackoverflow.com/questions/33045358/docke...

D
Dmitry Shitskov, 2019-03-20
@Zarom

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 question

Ask a Question

731 491 924 answers to any question