Files
GuardDen/Dockerfile

28 lines
617 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy all project files needed for installation
COPY pyproject.toml README.md ./
COPY src/ ./src/
# Install Python dependencies (including AI packages)
RUN pip install --no-cache-dir ".[ai]"
# Copy remaining files
COPY migrations/ ./migrations/
COPY alembic.ini ./
# Create non-root user
RUN useradd -m -u 1000 guardden && chown -R guardden:guardden /app
USER guardden
# Run the bot
CMD ["python", "-m", "guardden"]