# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
FROM python:3.10-alpine

# Install build dependencies
RUN apk add --no-cache gcc musl-dev linux-headers

WORKDIR /app

# Copy the entire repository (monorepo context)
COPY . .

# Set working directory to the MCP server subdirectory
WORKDIR /app/src/nova-canvas-mcp-server

# Create dummy AWS credentials to satisfy boto3 when using the default profile
RUN mkdir -p /root/.aws && \
    echo "[default]" > /root/.aws/credentials && \
    echo "aws_access_key_id = dummy" >> /root/.aws/credentials && \
    echo "aws_secret_access_key = dummy" >> /root/.aws/credentials

# Upgrade pip and install the package
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir .

# Expose port if using SSE transport (optional)
EXPOSE 8888

# Start the MCP server (entrypoint provided by project.scripts in pyproject.toml)
CMD ["awslabs.nova-canvas-mcp-server"]
