Skip to content

Improve container image build performance#90

Merged
rokuosan merged 4 commits intomainfrom
update-image-build
Apr 14, 2026
Merged

Improve container image build performance#90
rokuosan merged 4 commits intomainfrom
update-image-build

Conversation

@rokuosan
Copy link
Copy Markdown
Owner

Summary

  • reduce pull request build time by building only linux/amd64 in CI while keeping multi-arch builds for pushes and tags
  • speed up Docker builds with BuildKit cache mounts and a smaller build context
  • slim down the runtime image by building a static binary and running it as a non-root user
  • ignore local .cache artifacts generated during development

Why

The container image workflow was spending unnecessary time on emulated multi-platform builds in pull requests.
This change keeps release builds intact while making PR validation faster and tightening the runtime image setup.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes container build and CI performance by reducing unnecessary multi-arch work in pull requests, improving Docker build caching, tightening the build context, and hardening the runtime image.

Changes:

  • Build only linux/amd64 for PRs while keeping multi-arch builds for pushes/tags.
  • Speed up Docker builds via BuildKit cache mounts and a smaller build context (.dockerignore).
  • Produce a slimmer runtime image by building a static binary and running as a non-root user.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
docker/Dockerfile Adds BuildKit cache mounts, builds a static binary, and switches runtime to non-root.
.github/workflows/build-container-image.yaml Skips QEMU on PRs and conditionally limits PR builds to linux/amd64; adjusts cache/provenance settings.
.dockerignore Reduces Docker build context size by excluding VCS/editor/dev artifacts and built docs output.
.gitignore Ignores local .cache artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/build-container-image.yaml
Comment thread docker/Dockerfile
Comment thread docker/Dockerfile Outdated
@rokuosan rokuosan merged commit 0b698e9 into main Apr 14, 2026
3 checks passed
@rokuosan rokuosan deleted the update-image-build branch April 14, 2026 02:36
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