GoogleContainerTools / GoogleContainerTools/distroless

[Feature request] reduce the number of layers for base images

Open
#2,040 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
23.1k
Forks
1.4k
Avg merge
10h 8m
Merged PRs (30d)
26

Description

We (Google Cloud Dataflow team) use distroless as our base images. We observe the number of layers for the container has increased over time. For example, we use gcr.io/distroless/base-debian13 amd64.

As of Mar 16, it has 17 layers (gcr.io/distroless/base-debian13@sha256:a37e94d237342bac251a9c67967dcc65862c72393ed6c2c5a934824c6a72ec85)

before Aug 2025, it was 14.

One outcome is an Artifact Registry API quota, "Requests per project in the US multi-region per minute" repeatedly gets hit, as we observe the number of request is proportional to the layer of the images built.

We were able to mitigate the quota issue by squashing layers of the images we build. However the same inefficiency could affect all users using distroless, as well as the GCP project hosting distroless images as well.

By contrast, official debian:bookworm image only comes with single layer.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.