Replace npm ci command with npm run build in Dockerfile #2965
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.
Description
Fixed the Dockerfile for the sequential-thinking MCP server to properly compile TypeScript code during the Docker build process.
Server Details
Motivation and Context
The original Dockerfile had a bug that prevented the TypeScript code from being compiled to JavaScript during the Docker build. Line 10 was running
npm ci --ignore-scripts --omit-dev, which skipped thepreparescript that triggers the build. This resulted in a Docker image that appeared to build successfully but was non-functional because thedistdirectory was missing.This fix ensures the TypeScript code is properly compiled by explicitly running
npm run buildafter installing dependencies.How Has This Been Tested?
docker build -t mcp/sequentialthinking -f src/sequentialthinking/Dockerfile .echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | docker run --rm -i mcp/sequentialthinkinginitializeandtools/listrequestsBreaking Changes
No breaking changes. Users with the previous broken Docker image will need to rebuild it, but the configuration remains the same.
Types of changes
Checklist
Additional context
Before: The Dockerfile ran
npm ci --ignore-scripts --omit-devwhich prevented the TypeScript compilation.After: The Dockerfile now explicitly runs
npm run buildto compile TypeScript to JavaScript, ensuring thedistdirectory is created and the Docker image is functional.This fix makes the Docker installation method documented in the README actually work as intended.