Files
strava-mcp-server/Dockerfile
T

31 lines
882 B
Docker

# Use the official uv image for fast Python builds
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder
# Set the working directory
WORKDIR /app
# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1
# Copy the lockfile and pyproject.toml
COPY uv.lock pyproject.toml /app/
# Install dependencies (without the project itself) for caching
RUN uv sync --frozen --no-install-project --no-dev
# Copy the source code and README (required by hatchling for metadata)
COPY src /app/src/
COPY README.md /app/
# Install the project
RUN uv sync --frozen --no-dev
# Make the executable available in the path
ENV PATH="/app/.venv/bin:$PATH"
# Run the MCP server
# By default, strava-mcp uses fastmcp.run() which exposes stdio.
# If you want to run it as an SSE server, you might need to adjust the command.
# For now, we just call the main entrypoint.
ENTRYPOINT ["strava-mcp"]