switch-2-bot/Dockerfile

21 lines
390 B
Docker
Raw Permalink Normal View History

2025-01-08 04:33:21 +00:00
# Use Python 3.11 slim image as base
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code and .env
COPY main.py .
COPY .env .
# Expose health check port
EXPOSE 5000
# Run the bot
CMD ["python", "main.py"]