Repository navigation
chore(docker): add and expand .dockerignore files to shrink build contexts - #6409
Open
another-rex wants to merge 1 commit into
Open
another-rex wants to merge 1 commit into
another-rex wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6409 +/- ##
=======================================
Coverage 55.57% 55.57%
=======================================
Files 222 222
Lines 22928 22928
=======================================
Hits 12743 12743
Misses 10182 10182
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
michaelkedar
approved these changes
Nov 20, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds root
.dockerignoreandgo/.dockerignore, and expandsvulnfeeds/.dockerignoreto exclude large test fixtures and unrelated directories from Docker build contexts duringbuild-and-stage(and local Docker builds).(AI-assisted PR — part of a series of independent low-effort
build-and-stageoptimizations.)Details
.dockerignore: Onlydocker/worker-base/Dockerfile,gcp/workers/worker/Dockerfile, andgcp/workers/oss_fuzz_worker/Dockerfilebuild from repo root.. Excluding unrelated top-level directories (includingwebsite/wherebuild-frontend3createsnode_modulesmid-build) andosv/ecosystems/cassettes(29 MB of VCR test fixtures) shrinks root build context transfer from 335.9 MB to 1.55 MB (~99.5% reduction) while keepingosv/osv-schema/validation/schema.jsonintact.go/.dockerignore: Excludes**/testdata,**/__snapshots__, and**/*_test.go(including 14 MBgo/osv/ecosystem/testdata), shrinkinggo/build context from 17.0 MB to 1.44 MB (~91.5% reduction) and preventing test-only edits from invalidating Docker cache.vulnfeeds/.dockerignore: Adds**/testdata,test_data,**/__snapshots__, and**/*_test.go(including 70 MBvulnfeeds/git/testdata), shrinking each of the 9vulnfeedscontexts from 90.7 MB to ~616 KB (~99.3% reduction).Testing
COPYinstructions in Dockerfiles built from.,go/, andvulnfeeds/and confirmed no production code embeds or references excluded test directories.go/Dockerfile(--target custommetrics) locally: context 1.44 MB, succeeded.vulnfeeds/cmd/mirrors/debian-copyright-mirror/Dockerfilelocally: context 616 KB, succeeded.poetry run tools/lint_and_format.sh: passed.agy