Skip to content

Fix denoland/docs#2935: multi-stage Docker build doesn't ship deps to the runtime stage#3122

Merged
bartlomieju merged 5 commits into
mainfrom
orch/issue-65
May 14, 2026
Merged

Fix denoland/docs#2935: multi-stage Docker build doesn't ship deps to the runtime stage#3122
bartlomieju merged 5 commits into
mainfrom
orch/issue-65

Conversation

@fibibot
Copy link
Copy Markdown
Contributor

@fibibot fibibot commented May 14, 2026

Closes bartlomieju/orchid-inbox#65

lunadogbot and others added 4 commits May 14, 2026 06:51
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
Copy link
Copy Markdown
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_config.ts and _plugins changes appear to be unnecessary, revert them

@bartlomieju bartlomieju merged commit 00ef432 into main May 14, 2026
2 checks passed
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.

3 participants