Skip to content

fix(docker): allow README.md in build context for hatchling metadata#199

Merged
Elshayib merged 1 commit into
masterfrom
fix/docker-publish-readme-license
Jun 18, 2026
Merged

fix(docker): allow README.md in build context for hatchling metadata#199
Elshayib merged 1 commit into
masterfrom
fix/docker-publish-readme-license

Conversation

@Elshayib

Copy link
Copy Markdown
Owner

Summary

Fixes Docker publish CI failure (issue #198) where excluded and but tried to copy them.

Root Cause

  • line 31 () excluded
  • line 32 () excluded
  • line 14 did in the builder stage
  • Buildx build context filter removed these files → "not found" error during

The field in requires the file to exist at build time for hatchling to read the long description.

Changes

  1. ****: Added allowlist entries and so they're included in the build context
  2. ****: Copy in the builder stage (only and needed; is inline in pyproject.toml)

Testing

  • ✅ Docker build succeeds locally
  • ✅ Image runs correctly ( works)
  • ✅ All 639 tests pass
  • ✅ No regressions in lint/mypy/bandit

Notes

  • and are only needed at build time for hatchling metadata
  • They are NOT copied to the final runtime image (multi-stage build discards builder stage)
  • This keeps the final image minimal as intended

- .dockerignore: add !README.md and !LICENSE allowlist entries so they're
  available during the builder stage
- Dockerfile: copy README.md in builder stage (required by hatchling for
  readme field in pyproject.toml)

Fixes #198
@github-actions github-actions Bot added bug Something isn't working enhancement New feature or request labels Jun 18, 2026
@Elshayib Elshayib merged commit 65ca4b8 into master Jun 18, 2026
6 checks passed
@Elshayib Elshayib deleted the fix/docker-publish-readme-license branch June 18, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant