diff --git a/Dockerfile b/Dockerfile index 8137bf2..0703376 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,15 @@ -FROM python:3.11-alpine +FROM python:3.11-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Install system dependencies -RUN apk add --no-cache gcc musl-dev ffmpeg +RUN apt-get update && apt-get install -y --no-install-recommends \ + ffmpeg \ + libgl1-mesa-glx \ + libglib2.0-0 \ + && rm -rf /var/lib/apt/lists/* # Set work directory WORKDIR /app @@ -20,7 +24,7 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . # Create non-root user -RUN adduser -D -u 1000 appuser && chown -R appuser:appuser /app +RUN adduser --disabled-password --gecos '' --uid 1000 appuser && chown -R appuser:appuser /app USER appuser # Health check @@ -28,4 +32,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD python -c "import sys; sys.exit(0)" # Run the bot -CMD ["python", "bot.py"] \ No newline at end of file +CMD ["python", "bot.py"]