adding Dockerfile and ignores

This commit is contained in:
georg.sinn-schirwitz
2025-09-08 12:39:46 +02:00
parent 443159ec86
commit 262d5fca91
2 changed files with 67 additions and 0 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
# Use official Python image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies if needed (none for this app)
# RUN apt-get update && apt-get install -y gcc && rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create a non-root user
RUN useradd --create-home --shell /bin/bash app
USER app
# Command to run the application
CMD ["python", "main.py"]