lfex / dockerfiles

Dockerfiles for LFE based upon the official Erlang Docker images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add cleanup step to Debian based images

oubiwann opened this issue · comments

As proposed by @hdurer in a recent LFE mail list thread ("The state of LFE, or why I am losing hope"), the following will reduce overall image size for Debian-based Docker images:

RUN rm -rf /var/lib/apt/lists/*

Actually, I'm pretty sure you need to add it as && rm -rf /var/lib/apt/lists/* at the end of the existing RUN command.
As I understand it, each RUN command adds a layer to the image, so if you don't clean up in the first RUN command you'll add a layer with all the undesirable stuff in it and the next layer is just the information to remove it all again -- in the sum the image will not be smaller.

Ah, good point!

Going to be done as part of #25.