mcp-gpt-researcher/Dockerfile
ThomasTaroni dc93de9b18 Use shell form for CMD in Dockerfile
Switched CMD to use shell form instead of exec form for running the application. This simplifies the command syntax and ensures compatibility in environments where exec form parsing may cause issues.
2025-05-31 20:06:23 +02:00

28 lines
No EOL
798 B
Docker

# Use the official Python image as a base
FROM python:3.13-slim
# Set environment variable for Python
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Use an environment variable to define the script path
ENV APP_ENTRYPOINT "/app/mcp/gpt_researcher/server.py"
# Set working directory within the container
WORKDIR /app
# Copy the requirements file if you have it (or define dependencies manually)
# If you don't have a requirements.txt, let me know and I'll guide you further
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the project files into the container
COPY src/ /app/
# Expose the port that FastAPI will run on
EXPOSE 8000
# Set the default command to run the app with `uvicorn`
CMD python "$APP_ENTRYPOINT"