Skip to content

Add .dockerignore - #512

Open
Trosper3 wants to merge 1 commit into
CSharpAPIfrom
chore/add-dockerignore
Open

Add .dockerignore#512
Trosper3 wants to merge 1 commit into
CSharpAPIfrom
chore/add-dockerignore

Conversation

@Trosper3

Copy link
Copy Markdown
Contributor

Summary

  • There was no .dockerignore, so Dockerfile's COPY . . pulled .git/, Documentation/ (including images), build artifacts, editor metadata, and this session's .claude/ worktrees into the build context.
  • Adds .dockerignore excluding .git/, .github/, bin//obj/ (matches at any depth, so this also covers redux-tests/bin, redux-tests/obj, etc. — the "test project output" the issue called out), .vs//.vscode//.idea/, .claude/, .rbs/, report.md, Documentation/, and the Dockerfile/.dockerignore themselves.
  • Deliberately does NOT exclude redux-tests/ source (only its build output, via the bin//obj/ patterns): Directory.Build.targets runs dotnet format Redux.slnx --verify-no-changes before Build in Release config, and Redux.slnx includes redux-tests/redux-tests.csproj as a solution member — excluding the whole redux-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 once dotnet format failed to open the solution workspace.

Closes #465

Test plan

  • docker build from a git clone with core.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-LF dotnet format mismatch 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.85MB
  • docker run the resulting image and confirmed /swagger/index.html responds 200

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
@github-actions

Copy link
Copy Markdown

Redux Build System — CI Report

dotnet · commit 7969f6b

Operation Status Summary Time
audit no known vulnerabilities 4.4s
format-check all files formatted 22.1s
lint 0 issues 35.4s
typecheck ⏭️ covered by lint (dotnet build)
unit-test 898 passed · coverage 70% (min 80%) 45.6s
build built local/redux:ci · 234MB 38.3s
integration-test ⏭️ no [integration] command
push ⏭️ not implemented

Overall: ❌ 4 passed · 1 failed · 3 skipped

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.

Add .dockerignore

1 participant