How to manage inter-dependant docker containers when moving between or cloning environments

StackOverflow https://stackoverflow.com/questions/20980795

  •  25-09-2022
  •  | 
  •  

I am trying to wrap my head around how to run this particular workflow with docker.

  1. Dev environment for a developer - n number of containers, like db, webserver, appserver etc with dependencies between the containers. So the database will depend only data only volumes container, appserver container on database and so on.
  2. Now I need to port this to a new machine or environment, for e.g when a new developer joins, so that (s)he gets own environment to work with.

Step 1 is clear to me after reading advanced docker volumes and tiny docker pieces

My question is related to step 2. How do I cleanly manage to reproduce this new environment with all the interdependent containers up and running properly with a (hopefully)single command?

有帮助吗?

解决方案

You can use fig or maestro-ng.

The first one was designed for development environments, while the second one was designed for production environments; but both let you define a number of containers, with dependencies between them, and spin them up very easily from a single command.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top