Skip to content

feat: add Docker support for running MCP server#47

Open
ashaychangwani wants to merge 1 commit intopunitarani:mainfrom
ashaychangwani:feat/docker-support
Open

feat: add Docker support for running MCP server#47
ashaychangwani wants to merge 1 commit intopunitarani:mainfrom
ashaychangwani:feat/docker-support

Conversation

@ashaychangwani
Copy link
Copy Markdown

@ashaychangwani ashaychangwani commented Jan 23, 2026

Summary

This PR adds Docker support for easily running the Fli MCP server in a container.

  • Dockerfile: Production-ready image based on python:3.10-slim with uv for fast dependency management
  • docker-compose.yml: One-command startup with pre-built image reference
  • README.md: Minimal addition documenting Docker usage

Usage

# Using Docker Compose
docker compose up -d

# Or run directly
docker run -d -p 8000:8000 ashayc/fli-mcp:latest

# Or build locally
docker build -t fli-mcp .
docker run -d -p 8000:8000 fli-mcp

MCP server will be available at http://localhost:8000/mcp/

Note for Maintainer

The docker-compose.yml currently references ashayc/fli-mcp:latest as 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-mcp or Docker Hub.

Greptile Summary

This PR adds Docker support for the Fli MCP server by introducing a production Dockerfile, a docker-compose.yml, and a README section documenting usage.

The Dockerfile is well-structured — it copies only the necessary files, installs production dependencies with uv sync --frozen --no-dev, and correctly sets HOST=0.0.0.0 so the server (which defaults to 127.0.0.1) binds to all container interfaces. It is consistent with the existing .devcontainer/Dockerfile.

Key issues to resolve before merging:

  • Unverified personal Docker Hub image: Both docker-compose.yml and the README direct users to ashayc/fli-mcp:latest — a personal account with no affiliation to this repository. The recommended fix is to make build: . the default in compose (with the pre-built image referenced only in a comment) and remove the ashayc/ image from the README's docker run example until an official registry path is established under the project's namespace (e.g. ghcr.io/punitarani/fli-mcp).
  • Unpinned uv version (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 -d workflow pulls from ashayc/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

Filename Overview
Dockerfile New production Dockerfile based on python:3.10-slim; structure is correct and consistent with the devcontainer, but uv version is unpinned (latest).
docker-compose.yml New compose file defaults to a personal Docker Hub image (ashayc/fli-mcp:latest) rather than building locally; this is a supply-chain trust risk that must be addressed before merging.
README.md Adds Docker usage documentation; the 'docker run' example references the same unverified personal image from docker-compose.yml and should be removed or replaced.

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/]
Loading

Reviews (1): Last reviewed commit: "feat: add Docker support for running MCP..." | Re-trigger Greptile

Greptile also left 3 inline comments on this PR.

- Add production Dockerfile for MCP HTTP server
- Add docker-compose.yml with pre-built image reference
- Update README with Docker usage instructions
greptile-apps[bot]

This comment was marked as outdated.

@punitarani
Copy link
Copy Markdown
Owner

@greptileai review pls

Comment on lines +7 to +8
image: ashayc/fli-mcp:latest
# To build locally instead of using pre-built image, comment out 'image' and uncomment 'build':
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 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:

Suggested change
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 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).

Suggested change
# 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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 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:

Suggested change
# Using Docker Compose (recommended)
# Or run directly with docker (after building locally)
docker run -d -p 8000:8000 fli-mcp

@punitarani
Copy link
Copy Markdown
Owner

Review Notes

The Docker setup is well-structured — good layer caching strategy, slim base image, and proper HOST=0.0.0.0 binding.

Issue that needs fixing before merge:

  1. Personal Docker Hub image referencedocker-compose.yml defaults to image: ashayc/fli-mcp:latest and the README also references this personal image in the docker run example. This should be changed so docker-compose.yml defaults to a local build (build: .) with the pre-built image as a commented option. The README docker run example should use a generic name like fli-mcp (built locally) rather than a personal registry. Until an official image is published under the project's namespace (e.g. ghcr.io/punitarani/fli), we shouldn't direct users to pull from an external, unaffiliated registry.

Minor (non-blocking):

  • ghcr.io/astral-sh/uv:latest is unpinned — consider pinning to a specific version for build reproducibility.

Otherwise the Dockerfile itself looks solid.

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.

2 participants