Files
telegram-groupfactory/Dockerfile
corrado.mulas 9c714af9c0 Not tested yet
2026-05-08 00:03:06 +02:00

31 lines
630 B
Docker

# Deriving the latest base image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Copy requirements first (for better caching)
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY src/ ./src/
# Copy entrypoint script
COPY entrypoint.sh .
# Make entrypoint executable
RUN chmod +x entrypoint.sh
# Create non-root user for security
RUN adduser --disabled-password --gecos '' appuser && \
chown -R appuser:appuser /app
USER appuser
# Expose port if needed (adjust as necessary)
EXPOSE 8000
# Run the application
CMD ["./entrypoint.sh"]