feat: add Docker support for running MCP server#47
feat: add Docker support for running MCP server#47ashaychangwani wants to merge 1 commit intopunitarani:mainfrom
Conversation
- Add production Dockerfile for MCP HTTP server - Add docker-compose.yml with pre-built image reference - Update README with Docker usage instructions
b30527c to
77ae8bc
Compare
|
@greptileai review pls |
| image: ashayc/fli-mcp:latest | ||
| # To build locally instead of using pre-built image, comment out 'image' and uncomment 'build': |
There was a problem hiding this comment.
Personal Docker Hub image as default
The compose file defaults to pulling ashayc/fli-mcp:latest — a personal Docker Hub account belonging to the PR author, not the repository owner. Any user who runs docker compose up -d will silently pull from this unverified external image rather than building from the local source. This is both a supply-chain trust concern and a reliability risk (the image could be deleted or become stale at any time).
The safer default is to build from the local Dockerfile and document the pre-built image as an alternative option:
| image: ashayc/fli-mcp:latest | |
| # To build locally instead of using pre-built image, comment out 'image' and uncomment 'build': | |
| build: . | |
| # To use a pre-built image instead of building locally, comment out 'build' and uncomment 'image': | |
| # image: ghcr.io/punitarani/fli-mcp:latest |
A matching update to the README docker run example (line 376) should also drop the ashayc/fli-mcp:latest reference or replace it with the canonical registry path once one is established.
|
|
||
| FROM python:3.10-slim | ||
|
|
||
| # Install uv for fast dependency management |
There was a problem hiding this comment.
Unpinned
uv version reduces reproducibility
Using uv:latest means that each Docker build may pull a different version of uv, which could silently change resolution behaviour or introduce breaking changes. The devcontainer Dockerfile has the same pattern, so this is consistent with the project's current style — but for a production image it is worth pinning to a specific release (e.g. uv:0.6.x).
| # Install uv for fast dependency management | |
| COPY --from=ghcr.io/astral-sh/uv:0.6.8 /uv /uvx /bin/ |
Check the uv releases page for the latest stable version to pin.
| ### Running MCP Server with Docker | ||
|
|
||
| ```bash | ||
| # Using Docker Compose (recommended) |
There was a problem hiding this comment.
README documents a personal Docker Hub image
This docker run line directs users to pull ashayc/fli-mcp:latest, the same unverified personal image referenced in docker-compose.yml. Until an official image is published under the repository's namespace (e.g. ghcr.io/punitarani/fli-mcp), the documentation should only show the local-build workflow:
| # Using Docker Compose (recommended) | |
| # Or run directly with docker (after building locally) | |
| docker run -d -p 8000:8000 fli-mcp |
Review NotesThe Docker setup is well-structured — good layer caching strategy, slim base image, and proper Issue that needs fixing before merge:
Minor (non-blocking):
Otherwise the Dockerfile itself looks solid. |
Summary
This PR adds Docker support for easily running the Fli MCP server in a container.
python:3.10-slimwithuvfor fast dependency managementUsage
MCP server will be available at
http://localhost:8000/mcp/Note for Maintainer
The
docker-compose.ymlcurrently referencesashayc/fli-mcp:latestas the pre-built image. Feel free to change this to your preferred Docker Hub username/registry if you'd like to host the official image under your namespace.Alternatively, you can set up automated builds with GitHub Actions to publish to
ghcr.io/punitarani/fli-mcpor Docker Hub.Greptile Summary
This PR adds Docker support for the Fli MCP server by introducing a production
Dockerfile, adocker-compose.yml, and a README section documenting usage.The
Dockerfileis well-structured — it copies only the necessary files, installs production dependencies withuv sync --frozen --no-dev, and correctly setsHOST=0.0.0.0so the server (which defaults to127.0.0.1) binds to all container interfaces. It is consistent with the existing.devcontainer/Dockerfile.Key issues to resolve before merging:
docker-compose.ymland the README direct users toashayc/fli-mcp:latest— a personal account with no affiliation to this repository. The recommended fix is to makebuild: .the default in compose (with the pre-built image referenced only in a comment) and remove theashayc/image from the README'sdocker runexample until an official registry path is established under the project's namespace (e.g.ghcr.io/punitarani/fli-mcp).uvversion (uv:latest): Minor reproducibility risk; consider pinning to a specific release.Confidence Score: 4/5
Not safe to merge as-is; the compose file and README must stop directing users to a personal, unverified Docker Hub image before this ships.
There is one clear P1 defect: the default
docker compose up -dworkflow pulls fromashayc/fli-mcp:latest, an uncontrolled third-party image. This is a present supply-chain trust and reliability issue for anyone who follows the documentation. Once the image reference is replaced with a local build default, the remaining feedback is P2 (unpinned uv version), which would not block merge.docker-compose.yml and README.md both need the ashayc/fli-mcp:latest reference removed or replaced.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[User: docker compose up -d] --> B{Image source?} B -- "Current: image: ashayc/fli-mcp:latest" --> C[Pull from personal Docker Hub ⚠️] B -- "Recommended: build: ." --> D[Build from local Dockerfile] C --> E[Container starts\nHOST=0.0.0.0 PORT=8000] D --> E E --> F[uv sync --frozen --no-dev] F --> G[CMD: fli-mcp-http] G --> H["run_http() reads HOST/PORT env vars"] H --> I[MCP HTTP server at 0.0.0.0:8000] I --> J[Exposed on host as localhost:8000/mcp/]Reviews (1): Last reviewed commit: "feat: add Docker support for running MCP..." | Re-trigger Greptile