DEV Community

Discussion on: Dockerfile good practices [NOTE]

alastairmeasures profile image
Alastair Measures • Edited

Good article - thank you.

Am a bit focussed on reducing image sizes as generally a very good thing.

The image size may have only a limited effect on the RAM usage foot print of a running container. Doubtless Alpine images are smaller and build faster and load faster but do they actually cost less to host in the cloud?

Am partly looking to see why Ubuntu and Debian based remain so popular relative to Alpine?

igaurab profile image
igaurab Author • Edited

Hey Alastair, thanks for the comment. I have no idea about the costs.

Ubuntu and Debian may be preferable due to several reasons:

  1. Familiarity with the system/ Large per-existing community/ packages
  2. Security

Also these thread on might be relevant:

alastairmeasures profile image
Alastair Measures • Edited

Hey, Thank you for taking a moment to respond.

Familiarity seems a reason for inertia; when actually in most cases the effort to transition is a modest one off cost. If the Alpine RAM footprint is really half the size (of Ubuntu/ Debian) then the reduction in deployment hosting costs is recurring and therefore significant - especially for small startups.

There is also a relationship between executable size and CPU cache size that influences performance quite markedly.

Concerning security, everyone should always be "all ears" and the picture evolves - just ask OpenBSD about their SSL hick-up. Also given that your links are between 3 and 5 years old, it would be interesting to know how this has evolved.

Currently seeing little reason to switch focus away from Alpine; and if the moment comes, my familiarity with Ubuntu and Debian is still alive on my desktop.

Thanks again for your response.