#19502: Docker: install extension workspace deps for memory-lancedb
docker
size: XS
## Summary
- fix Docker install flow so bundled extension dependencies are installed
- copy `extensions/` before install and run workspace-aware install
## Changes
- `Dockerfile`
- `COPY extensions ./extensions` before dependency install
- `RUN pnpm -r install --frozen-lockfile`
## Why this is minimal
- avoids broad Docker/build refactors
- targets only the packaging gap that caused `memory-lancedb` runtime dependency misses
## Validation
- built Docker image locally
- confirmed plugin-context resolution for `openai` and `@lancedb/lancedb`
- loaded `extensions/memory-lancedb/index.ts` in container
- triggered `memory_store` with invalid key and got upstream `401 Incorrect API key provided`, confirming request path is functional
Fixes #19466
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR fixes Docker builds by ensuring extension dependencies are installed correctly. The change copies the `extensions/` directory before running `pnpm install` and uses the `-r` (recursive) flag to install all workspace package dependencies, including those from bundled extensions like `memory-lancedb`. This is a cleaner approach than the previously-reverted fix that attempted to install extension dependencies after the build as a separate step.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The changes are minimal and well-targeted: copying extensions before install and using pnpm's recursive flag is the correct approach for workspace package management. This fixes a real issue (missing runtime dependencies) in a clean, maintainable way. The author validated the fix locally and confirmed functional behavior. The approach is superior to the previously-reverted band-aid fix that installed dependencies after the build.
- No files require special attention
<sub>Last reviewed commit: b657092</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#3240: Fix Docker build failures on Windows/WSL environments
by Attili-sys · 2026-01-28
78.9%
#4450: fix bug #4366: Error: Config validation failed: plugins.slots.memor...
by tryagain3 · 2026-01-30
78.2%
#22692: fix(memory-lancedb): [P1] add missing runtime deps — plugin broken ...
by mahsumaktas · 2026-02-21
74.6%
#11454: fix(plugins): remove workspace:* from extension dependencies
by AnonO6 · 2026-02-07
73.1%
#5458: fix: set correct file ownership in Dockerfile (#5450)
by hakyonglee · 2026-01-31
73.0%
#11818: fix(docker): resolve build hang by using in-place ownership and opt...
by dilly · 2026-02-08
72.6%
#20055: fix(plugins): strip workspace:* dev-deps before npm install
by openperf · 2026-02-18
72.4%
#8526: fix(docker): copy extension package.json files before pnpm install
by robertcorreiro · 2026-02-04
72.3%
#11878: fix: add missing error handler to execDocker child process
by Yida-Dev · 2026-02-08
72.1%
#6631: fix: configure npm global prefix for non-root user in Docker
by tjetzinger · 2026-02-01
71.7%