Skip to content

Optimize Debian image footprint using multi-stage builds#649

Merged
YonathanZetune merged 1 commit into
masterfrom
revert-648-revert-646-roll-forward-footprint-opt
Jun 12, 2026
Merged

Optimize Debian image footprint using multi-stage builds#649
YonathanZetune merged 1 commit into
masterfrom
revert-648-revert-646-roll-forward-footprint-opt

Conversation

@YonathanZetune

@YonathanZetune YonathanZetune commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Optimize Debian image footprint using multi-stage builds

@YonathanZetune YonathanZetune changed the title Revert "Revert "Optimize Debian image footprint using multi-stage builds."" Optimize Debian image footprint using multi-stage builds Jun 9, 2026
@YonathanZetune YonathanZetune force-pushed the revert-648-revert-646-roll-forward-footprint-opt branch 5 times, most recently from 11ffaae to ecdedc3 Compare June 10, 2026 17:40
@YonathanZetune YonathanZetune marked this pull request as ready for review June 11, 2026 15:59
Comment thread all_components/Dockerfile
This change optimizes the footprint of the Debian-based Cloud SDK Docker images using multi-stage builds.

It also includes the following fixes:
- Pin tonistiigi/binfmt to sha256:400a4873b838d1b89194d982c45e5fb3cda4593fbfd7e08a02e76b03b21166f0 (qemu-v10.2.3-68) for stability and security.
- Remove default '=amd64' from global ARG TARGETARCH and use ${TARGETARCH:-amd64} in FROM base-${TARGETARCH} to support correct platform resolution in BuildKit while falling back gracefully on legacy builders.
- Skip execution of emulated gcloud/kubectl version checks (which fail on 64KB page size hosts under QEMU user emulation due to 4KB segment alignment of bundled Python) by checking if target arch matches build arch.
- Write gcloud configurations directly to config files at build time to avoid running gcloud commands under emulation.
@YonathanZetune YonathanZetune force-pushed the revert-648-revert-646-roll-forward-footprint-opt branch from ecdedc3 to 5834dcd Compare June 12, 2026 15:07
@YonathanZetune YonathanZetune merged commit 31bffa7 into master Jun 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants