Reputation: 364
Question: Is there a tool to create series of Docker containers?
My use case
In a nutshell:
I would like to put each main step into its own Docker container with defined input and output. Later more container should be attachable.
Docker-Compose doesn't seemed to fit
As far as i know, docker-compose helps you creating a bundle of Docker containers, which basically starts all containers together. But it doesn't let you first start container 1, after it's finished it starts container 2 and so on.
In the following a illustration:
Input => [Container 1] ==> ... ==> [Container n] ==> Output
Input means something like a volume or file. Output may be a generated file in a volume. Container shouldn't run in parallel, because they depend on each others input/output.
Use shell scripts
My current demo implements the upper approach using plain bash scripts. I first start container 1, let it finish the enrichment and after it stops, i start container 2 for the transformation.
I was wondering, if there is a more elegant approach or tool available?
Upvotes: 0
Views: 59
Reputation: 1028
There's nothing I'm aware of currently that allows for sequential instantiation of containers. I'm still falling back to using scripting for it, but you may be able to accomplish something more generic using the Remote API. Would involve significantly more work, however.
Upvotes: 1