
Docker Zen: Achieving True Minimalism with “Distroless” Images - clockworksoul
https://very-serio.us/posts/zen-minimalism-with-distroless-images/
======
memexy
How are runtime dependencies handled? If the artefacts are self contained then
I can see why this would work but how does it work when the artefacts are not
self-contained and have shared objects that they link to? How are these
dependencies added to the "distroless" container filesystem to avoid runtime
crashes because of missing dependencies?

Here's a concrete example, when compiling ruby from source we need several
libraries: `autoconf bison build-essential libssl-dev libyaml-dev
libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev
libdb-dev`. How would I add `zlib` to the distroless image?

~~~
clockworksoul
Good question! In a case like that you'll have to be a little more aggressive
about copying libraries from the build container.

I'm not super familiar with Ruby, but I think I found a decent example at:
[https://github.com/unasuke/distroless-
ruby](https://github.com/unasuke/distroless-ruby)

~~~
memexy
Yes, this is what I used to do when building deployment artefacts in chroots
with unionfs. I was asking to see if there had been some new developments
since then.

