Repository: github.com/detoxd/detoxd | Images: images/alpine
Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox. Created in 2005, Alpine is known for its exceptionally small footprint (~5MB base image) and security features, making it the de facto standard for minimal Docker images.
Alpine Linux includes several security features by default:
Even minimal images have risks:
apk upgradeRemoves special permissions from ALL binaries:
find / -perm /6000 -type f -exec chmod a-s {} \;
This prevents privilege escalation through:
/bin/su/usr/bin/passwd/bin/pingRemoves unnecessary system accounts:
games - Legacy gaming accountnews - Usenet news accountuucp - UUCP servicesproxy - Proxy serviceswww-data - Web server (if not needed)list - Mailing listirc - IRC servicesgnats - Bug reportingFROM detoxd/alpine:3.21-detox.1
# Create application user
RUN adduser -D -H -u 1000 -s /sbin/nologin appuser
# Set working directory
WORKDIR /app
# Copy application files
COPY --chown=appuser:appuser . .
# Switch to non-root user
USER appuser
CMD ["/app/myapp"]
docker run --read-only \
--tmpfs /tmp:rw,noexec,nosuid \
detoxd/alpine:3.21-detox.1
docker run --cap-drop=ALL \
--security-opt=no-new-privileges:true \
detoxd/alpine:3.21-detox.1
# Remove shell if not needed
RUN rm -rf /bin/sh /bin/ash /bin/busybox 2>/dev/null || true
| Feature | Standard Alpine | Detoxd Alpine |
|---|---|---|
| Setuid binaries | Present | Removed |
| Legacy users | Present | Removed |
| Package cache | Present | Removed |
| Cron | Configured | Removed |
| Init scripts | Present | Removed |
| CVE patches | Manual | Applied |
Content type
Image
Digest
sha256:b0effd523…
Size
3.7 MB
Last updated
6 months ago
docker pull detoxd/alpine:3.23.3-detox.1