Why I Will Never Use Alpine Linux Ever Again
<p>Nowadays, Alpine Linux is one of the most popular options for container base images. Many people (maybe including you) use it for anything and everything. Some people use it because of its small size, some because of habit, and some, just because they copy-pasted a <code>Dockefile</code> from some tutorial. Yet, there are plenty of reasons why you should not use Alpine for your container images, some of which can cause you grief.</p>
<h1>The Source of All The Grief</h1>
<p>To understand what makes Alpine a bad choice in some situations, we first need to talk about <code>musl</code>. <code>musl</code> is an implementation of C standard library. It is more lightweight, faster, and simpler than <code>glibc</code> used by other Linux distros, such as Ubuntu. Both of these implementations are interchangeable for the most part, that's why in most cases, you can switch from, e.g., Ubuntu to Alpine and never notice any difference.</p>
<p>However, the little differences can cause all the grief. Some of it stems from how <code>musl</code> (and therefore also Alpine) handles DNS (it's always DNS), more specifically, <code>musl</code> (by design) doesn't support DNS-over-TCP. Usually, you would not notice this difference because most of the time, a single UDP packet (512 bytes) is enough to resolve hostnames... until it isn't enough, and your application (running on Kubernetes) that previously worked completely fine for months suddenly starts throwing "Unknown Host" exceptions for one particular (very critical) hostname. The worst part is that this can manifest randomly, anytime when some external network change causes the resolution of some particular domain to require more than the 512 bytes available in a single UDP packet.</p>
<p><a href="https://betterprogramming.pub/why-i-will-never-use-alpine-linux-ever-again-a324fd0cbfd6">Visit Now</a></p>