
Installing system packages in Docker with minimal bloat - itamarst
https://pythonspeed.com/articles/system-packages-docker/
======
baylisscg
The initial container is a contrived worst case example. Not necessarily a bad
idea when you want to make a point but most of the gains are from not doing
things you’re told not to do on page 2 of the docker tutorial.

Also, while vanilla Dockerfiles do need to carefully clean up after themselves
BuildKit offers you a friendlier way of handling this with
‘--mount=type=cache’ on the appropriate directories

------
amdavidson
Adding these commands to a separate script seems like an unnecessary level of
abstraction.

Concatenating the commands with &&, adding "\--no-install-recommends", and
adding " && apt-get clean && rm -rf /var/lib/apt/lists/*" to the Dockerfile
seems much more straightforward and maintainable.

------
lykr0n
you shouldn't be installing syslog-ng in your container. Containers should do
a single thing. If you want syslog, run a syslog-ng container.

