Repository navigation
Conversation
The website image copies `.tmp/site-install`, the prepared installation the site build ran its pages with, so that tree holds the build host's `.venv` and `__pycache__`. `worker/Dockerfile.dockerignore` kept them out, but Docker reads an ignore file beside the Dockerfile only when it is given the Dockerfile's path. Wrangler passes the Dockerfile on stdin (`-f -`), so the dev image that `worker/deploy-dev.sh` builds through Wrangler copied both in, and `leaf-dev site verify` copied the ignore file to its context's root to cover the same gap in its own Wrangler build. `COPY --exclude` leaves them out however Docker receives the Dockerfile, so the ignore file and the verifier's copy of it go. `--exclude` needs Dockerfile syntax 1.19 (1.18 refuses the flag), so the Dockerfile names `docker/dockerfile:1` rather than relying on the engine's built-in frontend. Checked: a stdin build with the same `COPY` line leaves out `.venv` and `__pycache__` both at the top of the tree and nested; `docker build --check` parses the Dockerfile; `pnpm run check:worker`. The pull request's `test` job builds the site and the image and serves it through `wrangler dev`.
leaf-agent
approved these changes
Nov 19, 2026
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.
The website image copies
.tmp/site-install, the prepared installation the site build ran its pages with, so that tree holds the build host's.venvand__pycache__.worker/Dockerfile.dockerignorekept them out only when Docker was given the Dockerfile's path. Wrangler passes the Dockerfile on stdin (-f -), so the dev imageworker/deploy-dev.shdeploys copied both in, andleaf-dev site verifycopied the ignore file to its context root to cover its own Wrangler build.COPY --excludeleaves them out however Docker gets the Dockerfile, so the ignore file and that copy step go.Worth weighing:
--excludeneeds Dockerfile syntax 1.19 (1.18 refuses it), so the Dockerfile now starts with# syntax=docker/dockerfile:1, and each build fetches that frontend from Docker Hub rather than using the engine's built-in one.Max asked for this as a follow-up to #6466. Checked: a stdin build with the same
COPYline leaves out.venvand__pycache__at the top of the tree and nested;docker build --check;pnpm run check:worker. This PR'stestjob builds the site and the image and serves it throughwrangler dev.