Add .dockerignore - #512
Open
Trosper3 wants to merge 1 commit into
Open
Conversation
Dockerfile's COPY . . pulled .git/, Documentation/ (including images), build artifacts (bin/obj at any depth, including redux-tests'), editor metadata, and this session's .claude/ worktrees into the Docker build context. Excludes those; Problems/**, wwwroot, and redux-tests source (needed by Directory.Build.targets' `dotnet format Redux.slnx --verify-no-changes` gate, which loads the whole solution including redux-tests.csproj) are intentionally left in. Closes #465
Redux Build System — CI Report
Overall: ❌ 4 passed · 1 failed · 3 skipped |
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.
Summary
.dockerignore, soDockerfile'sCOPY . .pulled.git/,Documentation/(including images), build artifacts, editor metadata, and this session's.claude/worktrees into the build context..dockerignoreexcluding.git/,.github/,bin//obj/(matches at any depth, so this also coversredux-tests/bin,redux-tests/obj, etc. — the "test project output" the issue called out),.vs//.vscode//.idea/,.claude/,.rbs/,report.md,Documentation/, and theDockerfile/.dockerignorethemselves.redux-tests/source (only its build output, via thebin//obj/patterns):Directory.Build.targetsrunsdotnet format Redux.slnx --verify-no-changesbefore Build in Release config, andRedux.slnxincludesredux-tests/redux-tests.csprojas a solution member — excluding the wholeredux-tests/directory breaks that formatting gate inside the image. Caught this by actually attempting the Docker build with the naive full-directory exclusion first; had to narrow it oncedotnet formatfailed to open the solution workspace.Closes #465
Test plan
docker buildfrom a git clone withcore.autocrlf=false(an LF-normalized checkout matching what CI's Linux runners actually see — building straight from this Windows working copy hits an unrelated, pre-existing CRLF-vs-LFdotnet formatmismatch that reproduces identically with or without this.dockerignore, so it isn't caused by this change) — succeeded end-to-end, build context reduced to 1.85MBdocker runthe resulting image and confirmed/swagger/index.htmlresponds200