Andrey Kartashov
Andrey Kartashov

Reputation: 1421

Docker single process by container but how to use them together

I have standalone bioinformatic's tools I've put them into containers and they work fine. Now I have to put into container a tool that uses some of already dockerized tools. Not a real but understandable example: Docker A has cat, Docker B has wc and we have a third tool catwc that uses cat and wc in same combinations.

Docker's best practice suggests: "In almost all cases, you should only run a single process in a single container. Decoupling applications into multiple containers makes it much easier to scale horizontally and reuse containers. If that service depends on another service, make use of container linking."

All solutions that I see are cumbersome.

In bioinformatics term I have a list of tools each one in separate docker image: bwa, bowtie, samtools, tabix, bgzip, bedGraphToBigWig, SHAPEIT2, VCFtools, Plink and I have the tool that uses all of them alea package which is java based, one solution that I use is to put everything into one image.

Are there other more manageable/space safe solutions?

Upvotes: 2

Views: 241

Answers (1)

VonC
VonC

Reputation: 1324278

It depends if this tools are running processes (like servers), or a simple libraries to be called (which, for instance, bigWig seems to be)

For librairies, you can containerize them in data volume containers that you can them mount in a final container with the option --volumes-from.
That means those containers don't run anything, they are just docker credate'd.

The other option is to build the image of the final container directly with those libraries COPY'd in them.

For programs which are running a process, you can linking them to the main container (as they are managed by the same docker daemon) with the --link option.
That way, the main container can ping and access the other ones.

Upvotes: 3

Related Questions