fix: Dockerfile.server COPYs package.json files that don't exist in this repo - #1005
Open
capt-marbles wants to merge 1 commit into
Open
Conversation
… repo packages/craft-cli, packages/craft-agents-commands, and apps/marketing are listed in bun.lock and copied by Dockerfile.server, but don't exist in this repository (likely stripped from the internal monorepo before export without updating the lockfile). This makes `docker buildx build -f Dockerfile.server .` fail on a clean checkout: ERROR: failed to calculate checksum of ref ...: "/packages/craft-agents-commands/package.json": not found None of the packages needed by the headless server (server, server-core, shared, core, session-tools-core, session-mcp-server, pi-agent-server, ui, messaging-gateway, messaging-whatsapp-worker) depend on any of the three missing packages, so excluding them from the workspace list is a safe, self-contained fix. Changes: - Exclude the three missing paths via workspaces negation globs in package.json (same pattern already used for !apps/online-docs) - Remove the now-stale COPY lines for their package.json files from Dockerfile.server - Regenerate bun.lock accordingly Testing: docker buildx build -f Dockerfile.server -t craft-agent-server --load . succeeds on a clean --depth 1 clone; ran the resulting image and confirmed the server starts and accepts connections.
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.
Summary
Dockerfile.serverandbun.lockreference three workspace packages —packages/craft-cli,packages/craft-agents-commands, andapps/marketing— that aren't present in this repository, so a clean checkout can't build the headless server image.Problem
fails with:
ls packages/ apps/on a freshgit cloneconfirms those three directories genuinely don't exist in the tree, whilebun.lockstill lists them as workspace members andDockerfile.serverstillCOPYs theirpackage.jsonfiles. My guess is these are internal-only packages (an internal CLI tool and the marketing site) that get stripped when this repo is exported/synced from an internal monorepo, without the lockfile and Dockerfile being updated to match.I checked: nothing the headless server actually needs —
server,server-core,shared,core,session-tools-core,session-mcp-server,pi-agent-server,ui,messaging-gateway,messaging-whatsapp-worker— depends on any of the three missing packages.packages/craft-clionly depends onpackages/craft-agents-commands(both missing, mutually isolated), andapps/marketinghas no dependents at all. So excluding all three from the workspace is safe and self-contained.Changes
package.json: exclude the three missing paths via workspaces negation globs (same pattern already used for!apps/online-docs)Dockerfile.server: remove the now-staleCOPYlines for theirpackage.jsonfilesbun.lock: regenerated viabun installto drop the three workspace entries (90 lines removed, nothing else changed)Testing
docker buildx build -f Dockerfile.server -t craft-agent-server --load .succeeds on a clean--depth 1clone (previously failed as above)docker run ...), confirmedCraft Agent server listening on ws://0.0.0.0:9100and that it accepts a connectionbun installlocally resolves cleanly with no other changes ("Removed: 3", no other package affected)