trenpixster / elixir-dockerfile

Dockerfile for creating a docker image of the latest Elixir and Erlang OTP versions
147 stars 49 forks source link

Combine commands when applicable #4

Closed mmcc closed 10 years ago

mmcc commented 10 years ago

Thanks for being awesome about keeping this up to date! I noticed during a fresh build the other day that there are a lot of layers coming out of this base image, so this is a PR to help clean that up a little. All I've done is combine run commands when applicable, which should have a few side effects.

All in all, this takes a build from 32 steps to 18 16 while still staying fairly readable (imo). It also decreases the image size by 79.6mb (which isn't massive, but at least it's a little something).

Update: By using apt-key adv --fetch-keys, we don't need wget and multiple apt-get update / installs. Also by moving the cleanup to the layer that apt-get actually runs in, we're able to actually clean things up in that layer, which is what we really want to do.

trenpixster commented 10 years ago

Thanks so much @mmcc, that seems great! I'll give it a spin and merge if all goes well.

trenpixster commented 10 years ago

Seems good, if you have any more suggestions for shrinking the image size feel free to submit them!

mmcc commented 10 years ago

Cool! Will do.