When using Alpine linux on a server or Alpine-based container deployment, what are some well known bugs or gotchas? Include one section for MUSL libc issues, and a section for other. I am aware of the DNS issue on Kubernetes, so include that one in the MUSL section.
MUSL libc Issues:
- DNS resolution failures in Kubernetes due to MUSL's resolver not supporting search domains properly. Workaround: Use CoreDNS or external DNS servers
- No support for NSS modules, affecting LDAP/NIS authentication
- Incomplete locale support causing string sorting/comparison issues
- Limited threading model can impact high-concurrency applications
- Some compiled binaries may fail due to glibc dependencies
- No support for dlopen() on static binaries
Other Alpine Issues:
- Package conflicts when mixing community and main repositories
- Limited package availability compared to other distributions
- Init system (OpenRC) differences from systemd requiring service management changes
- Build failures for packages assuming glibc toolchain
- Shell script compatibility issues due to BusyBox providing minimal versions of utilities
- Memory management differences affecting applications tuned for glibc environments
Workarounds typically involve:
- Using gcompat package for glibc compatibility
- Building from source with Alpine-specific flags
- Using Docker multi-stage builds to handle compile-time dependencies
source: Claude.ai