Distroless Docker images

When building Docker images for our applications, we’re often concerned with two things: the security and the size of the image. Traditionally, we’ve used container security scanning tools to detect and patch common vulnerabilities and exposures and small distributions such as Alpine Linux to address the image size and distribution performance. In this Radar, we’re excited about addressing the security and size of containers with a new technique called distroless docker images, pioneered by Google. With this technique, the footprint of the image is reduced to the application, its resources and language runtime dependencies, without operating system distribution. The advantages of this technique include reduced noise of security scanners, smaller security attack surface, reduced overhead of patching vulnerabilities and even smaller image size for higher performance. Google has published a set of distroless container images for different languages. You can create distroless application images using the Google build tool Bazel, which has rules for creating distroless containers or simply use multistage Dockerfiles. Note that distroless containers by default don’t have a shell for debugging. However, you can easily find debug versions of distroless containers online, including a busybox shell.

https://github.com/GoogleContainerTools/distroless

https://www.thoughtworks.com/radar/techniques/distroless-docker-images

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: