# Building minimal and low CVE images for compiled languages

DevFeed: [Building minimal and low CVE images for compiled languages](<https://devfeed.tech/articles/building-minimal-and-low-cve-images-for-compiled-languages-12906.md>)

Original publisher: [Read original article](<https://www.chainguard.dev/unchained/building-minimal-and-low-cve-images-for-compiled-languages>)

Published: 2024-02-27T00:00:00Z

Content type: article

Language: en

Sources: [Chainguard: Unchained](<https://devfeed.tech/sources/chainguard-unchained.md>)

Topics: [chainguard images](<https://devfeed.tech/topics/chainguard-images.md>), [Containers](<https://devfeed.tech/topics/containers.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [Vulnerabilities](<https://devfeed.tech/topics/vulnerabilities.md>), [Docker Hub](<https://devfeed.tech/topics/docker-hub.md>), [Debian](<https://devfeed.tech/topics/debian.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>)

Tags: [chainguard](<https://devfeed.tech/tags/chainguard.md>), [chainguard-images](<https://devfeed.tech/tags/chainguard-images.md>), [compiled-language](<https://devfeed.tech/tags/compiled-language.md>), [containers](<https://devfeed.tech/tags/containers.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [distroless](<https://devfeed.tech/tags/distroless.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-hub](<https://devfeed.tech/tags/docker-hub.md>), [dockerfiles](<https://devfeed.tech/tags/dockerfiles.md>), [dockerhub](<https://devfeed.tech/tags/dockerhub.md>), [go](<https://devfeed.tech/tags/go.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>)

## AI overview

This article demonstrates how to build smaller, lower-CVE container images for compiled languages by separating build and runtime concerns and replacing full Debian or Ubuntu bases with Chainguard Images. A Go web server example reduces the image from 892 MB to 775 MB and eliminates the reported CVEs after a one-line base-image change.

## Source excerpt

Leverage Chainguard's insights to forge low-CVE, compact images for compiled languages, boosting your security posture.