how to make an All-In-One docker using sbt-docker and sbt-assembly

77 views
Skip to first unread message

Lian Jiang

unread,
May 21, 2015, 7:40:11 AM5/21/15
to simple-b...@googlegroups.com
Due to the size of each docker image (about 800M), I want to create an All-In-One docker image for my multi-module project. So that I can spin up one machine in cloud hosting this docker container for some sanity check (but more realistic than testing on my dev box). I am using sbt-docker and sbt-assembly.

Suppose my project has module root, mod1, mod2 where sbt-assembly creates a fat jar for each of them. I want the root module to use sbt-docker to create a docker image having mod1.jar and mod2.jar deployed so that I can use a script to run all the jars on this container. I have already made root aggregates and depends (compile->IntegrationTest) on mod1 and mod2. However, I always got dependency issue (e.g. root cannot find mod1 fat jar). Also I parse the root module's jar path and artifact name, replace the module name to get the mod1/mod2's artifact path which is ugly.

Is there a naturally supported way/plugin to create such All-in-One docker? Appreciate!  
 
Reply all
Reply to author
Forward
0 new messages