الملفات
Ghyamah-task-1-cli2/test-projects/fastapi-test/Dockerfile
2026-08-20 21:42:57 +03:00

24 أسطر
540 B
Docker

# 🐍 Auto-generated Dockerfile for Python 3.12
# Ghaymah detected: FastAPI
FROM python:3.12-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt* setup.py* pyproject.toml* ./
RUN pip install --no-cache-dir -r requirements.txt 2>/dev/null || true
# Copy application code
COPY . .
# Expose port
EXPOSE 8080
# Start the application
CMD ["sh", "-c", "python main.py"]