Fix denoland/docs#2935: multi-stage Docker build doesn't ship deps to the runtime stage#3122
Merged
Conversation
The multi-stage Dockerfile example ran `deno install --entrypoint main.ts` in the build stage, but `deno install` populates Deno's global cache ($DENO_DIR), not the project directory. With only `COPY --from=builder /app .` in the runtime stage, the cached deps never made it across and the container re-downloaded them on first run. Point $DENO_DIR at /deno-dir in both stages and add a second COPY so the populated cache rides along with the app. Verified by building against denoland/deno:latest and running with `docker run --network none …`: the container now starts and prints output without re-fetching. Closes #2935
bartlomieju
requested changes
May 14, 2026
Member
bartlomieju
left a comment
There was a problem hiding this comment.
_config.ts and _plugins changes appear to be unnecessary, revert them
This reverts commit 25a7e5c.
bartlomieju
approved these changes
May 14, 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.
Closes bartlomieju/orchid-inbox#65