Files
telegram-groupfactory/Dockerfile
2026-06-19 08:59:53 +00:00

31 lines
631 B
Docker

# Deriving the latest base image
FROM python:3.12-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"]