# UnitForge Docker Image # Simple build for development and production FROM python:3.11-slim # Set environment variables ENV PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ PIP_NO_CACHE_DIR=1 \ PIP_DISABLE_PIP_VERSION_CHECK=1 # Install system dependencies RUN apt-get update && apt-get install -y \ curl \ git \ build-essential \ && rm -rf /var/lib/apt/lists/* # Create app user RUN groupadd --gid 1000 app && \ useradd --uid 1000 --gid app --shell /bin/bash --create-home app # Set work directory WORKDIR /app # Copy dependency files and install Python dependencies COPY backend/requirements.txt backend/ RUN pip install --no-cache-dir -r backend/requirements.txt # Copy source code COPY . . # Make scripts executable RUN chmod +x unitforge-cli start-server.sh demo.sh 2>/dev/null || true # Change ownership RUN chown -R app:app /app USER app EXPOSE 8000 # Default command for development CMD ["./start-server.sh", "--host", "0.0.0.0", "--log-level", "debug"]