mesosphere/marathon — pull request #925 by bobrik (2014-12-30 09:47:44+00:00)
Title: Slim docker image

Using mesos image as base, removing caches and unneded files after sbt.

Image size is much smaller, 1.316gb vs 1.951gb for current image. Moreover, if you run marathon on the same node as mesos (which is common case), you get 1.172gb shared with mesos-master image. It makes 150mb on disk instead of 1951mb. Layer where marathon jar is built:

```
47f807a08209 23 seconds ago /bin/sh -c sbt assembly && mv $(find targ 59.39 MB
```

And old one:

```
7fc8b0dc7d69 6 weeks ago /bin/sh -c sbt assembly 483.9 MB
```

However, ideal case would be (single `RUN` step):

1. Install jdk, scala, sbt
2. Build marathon jar
3. Remove jdk, scala, sbt
4. Install jre

This way image would only contain needed files to run marathon, not to build it. Disk and bandwidth savings compared to proposed version are not that big to do it now.

Bonus: mesos version is now more obvious.