Skip to content

Build the image from the whole tree, not a curated COPY list - #236

Merged
thedancingdeveloper merged 1 commit into
mainfrom
fix/dockerfile-copies-the-tree
Aug 8, 2026
Merged

Build the image from the whole tree, not a curated COPY list#236
thedancingdeveloper merged 1 commit into
mainfrom
fix/dockerfile-copies-the-tree

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Contributor

The first build of the deployment image failed collecting tests/test_deployment_docs.py — the Dockerfile copied src, tests and examples, and the suite reads docs/DEPLOYMENT.md.

Adding docs fixes that one test and leaves the trap in place. The test stage exists to run the repository's own gates in the image that gets deployed, and those gates read the repository: docs, pyproject.toml for the wheel build, README.md. A curated COPY list is a build failure waiting for the next test that reads a file nobody remembered to add.

Context is copied whole; .dockerignore names what stays out (git history, the local virtualenv — wrong platform inside the image — and build caches).

Run that failed: https://github.com/TheDancingDeveloper-org/agent-harness/actions/runs/31241801372

The first build of this image failed collecting `tests/test_deployment_docs.py`:
the Dockerfile copied `src`, `tests` and `examples`, and the suite reads
`docs/DEPLOYMENT.md`.

Adding `docs` would have fixed that one test and left the trap. The `test`
stage exists to run the repository's own gates in the image that gets
deployed, and those gates read the repository — docs, `pyproject.toml` for the
wheel build, `README.md`. Any curated list is a build failure waiting for the
next test that reads a file nobody remembered.

So the context is copied whole and `.dockerignore` names what must stay out:
git history, the local virtualenv (wrong platform inside the image), and build
caches.
@thedancingdeveloper
thedancingdeveloper merged commit e71a9ee into main Aug 8, 2026
3 checks passed
@thedancingdeveloper
thedancingdeveloper deleted the fix/dockerfile-copies-the-tree branch August 8, 2026 06:57
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.

1 participant