Skip to content

Honor nested .dockerignore exclusions in Docker build context#1229

Merged
cristianrgreco merged 2 commits intomainfrom
codex/issue-775-dockerignore-nested-exclusions
Feb 17, 2026
Merged

Honor nested .dockerignore exclusions in Docker build context#1229
cristianrgreco merged 2 commits intomainfrom
codex/issue-775-dockerignore-nested-exclusions

Conversation

@cristianrgreco
Copy link
Collaborator

Summary of changes

  • precompute build-context entries and apply @balena/dockerignore filtering before tarring
  • ensure the selected Dockerfile is always present in tar entries
  • add regression fixture and integration test for nested exclusion patterns (* with !subdir/nested)

Verification commands run

  • npm run format
  • npm run lint
  • npm test -- packages/testcontainers/src/generic-container/generic-container.test.ts -t "dockerignore"

Test results summary

  • both dockerignore integration tests pass:
    • should honour .dockerignore file
    • should honour nested .dockerignore exclusion patterns

Closes #775

@cristianrgreco cristianrgreco added bug Something isn't working patch Backward compatible bug fix labels Feb 17, 2026
@netlify
Copy link

netlify bot commented Feb 17, 2026

Deploy Preview for testcontainers-node ready!

Name Link
🔨 Latest commit 778f827
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-node/deploys/69946802d23e940008cf8e2a
😎 Deploy Preview https://deploy-preview-1229--testcontainers-node.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cristianrgreco cristianrgreco merged commit 975665b into main Feb 17, 2026
668 of 673 checks passed
@cristianrgreco cristianrgreco deleted the codex/issue-775-dockerignore-nested-exclusions branch February 17, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working patch Backward compatible bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.dockerignore doesn't honor subdirectory exclusion patterns

1 participant