Files
strava-mcp-server/Dockerfile
T
matthias 2b061f4791
CI/CD Pipeline / Lint & Check (push) Successful in 55s
CI/CD Pipeline / Build & Push Docker Image (push) Failing after 1m14s
feat: implement dynamic versioning and add automated Docker CI/CD workflow with enhanced documentation
2026-05-09 02:57:41 +02:00

35 lines
1014 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/
# Provide the version to hatch-vcs (setuptools-scm) during the build
ARG VERSION=dev
ENV SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION}
# 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"]