I have a specific configuration of containers, volumes, and networks that I have in a docker-compose file. I need to be able to create multiple instantiations of this configuration, to run side-by-side, maintaining the ability to shut one down, or bring a new one up as I please. The best method I’ve come up with so far is to use bash scripts to generate new docker-compose files, and simply add a prefix to all container names, network names, etc. in order to differentiate. The constant generation of new compose files to bring an instance up or to take one down is becoming a nightmare for me. Is there a better way to accomplish this?
I’m using Docker version 18.05.0-ce, and Docker-compose version 1.20.0 on Debian 4.9.110-1. Thanks.