53 lines
1.3 KiB
Text
53 lines
1.3 KiB
Text
# Development Dockerfile for GeoGuessr MCP Server
|
|
FROM python:3.13-slim
|
|
|
|
# Prevent Python from writing pyc files and buffering stdout/stderr
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
git \
|
|
ssh \
|
|
sudo \
|
|
vim \
|
|
nano \
|
|
htop \
|
|
procps \
|
|
net-tools \
|
|
iputils-ping \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create non-root user for development
|
|
ARG USERNAME=vscode
|
|
ARG USER_UID=1000
|
|
ARG USER_GID=$USER_UID
|
|
RUN groupadd --gid $USER_GID $USERNAME \
|
|
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
|
|
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
|
&& chmod 0440 /etc/sudoers.d/$USERNAME
|
|
|
|
# Install uv for fast package management
|
|
RUN pip install --no-cache-dir uv
|
|
|
|
# Set up workspace
|
|
WORKDIR /workspace
|
|
|
|
# Copy pyproject.toml and poetry.lock (or similar) first for layer caching
|
|
COPY pyproject.toml README.md ./
|
|
|
|
# Install project and dev dependencies using uv
|
|
RUN uv pip install --system --no-cache --upgrade pip && \
|
|
uv pip install --system --no-cache -e ".[dev]"
|
|
|
|
COPY . .
|
|
|
|
# Switch to non-root user
|
|
USER $USERNAME
|
|
|
|
# Set Python path
|
|
ENV PYTHONPATH=/workspace
|
|
|
|
# Default command
|
|
CMD ["sleep", "infinity"]
|