32 lines
814 B
Docker
32 lines
814 B
Docker
# Use Python 3.10 slim image as base
|
|
FROM python:3.10-slim
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install build dependencies and curl for healthcheck
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
python3-dev \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy project files
|
|
COPY pyproject.toml poetry.lock ./
|
|
COPY splunk_mcp.py ./
|
|
COPY README.md ./
|
|
COPY .env.example ./
|
|
|
|
# Install poetry and dependencies
|
|
RUN pip install --no-cache-dir poetry && \
|
|
poetry config virtualenvs.create false && \
|
|
poetry install --no-interaction --no-ansi
|
|
|
|
# Si lo anterior no funciona, prueba instalando fastapi directamente
|
|
RUN pip install --no-cache-dir fastapi uvicorn
|
|
|
|
# Create directory for environment file
|
|
RUN mkdir -p /app/config
|
|
|
|
# Resto del Dockerfile igual que antes... |