Skip to content

release: store the D2 binary once in Docker images - #3003

Merged
alixander merged 1 commit into
masterfrom
perf/docker-single-binary
Nov 23, 2026
Merged

alixander merged 1 commit into
masterfrom
perf/docker-single-binary

Conversation

@alixander

@alixander alixander commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Human


AI

The Docker image stored the compressed release archive in one layer, then extracted and installed two copies of the D2 executable in another. This made users download the same CLI payload three times.

Mount the architecture-specific release archive during the build and hard-link the unpacked executable to /usr/local/bin/d2. Both existing paths remain regular files. The versioned release directory still includes the license and third-party notices, and the man page is installed at its usual path.

The Docker smoke workflow now verifies that both paths resolve to the same inode on amd64 and arm64 before running the CLI and render checks. Local validation passed with go test ./ci/release/docker and git diff --check.

Native CI verified both CLI paths share one inode and rendered SVG, TALA SVG, and PNG on both architectures.

Compressed OCI layers Previous smoke run This PR
linux/amd64 92,163,430 bytes 54,596,803 bytes
linux/arm64 86,554,014 bytes 52,155,431 bytes

The previous run used an earlier D2 commit. The PR run used the same smoke version and compression settings.

  • sent from alixander's Codex

@alixander
alixander merged commit 56c5172 into master Nov 23, 2026
16 checks passed
@alixander
alixander deleted the perf/docker-single-binary branch November 23, 2026 13:43
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.

1 participant