FROM aquasec/trivy:latest # Switch to root to install additional packages USER root # Install Python and required system dependencies RUN apk add --no-cache \ python3 \ py3-pip \ git \ docker-cli \ unzip \ bash # Set working directory WORKDIR /app # Copy requirements first for better caching COPY requirements.txt . RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt # Copy application files COPY app.py . # Create necessary directories RUN mkdir -p /tmp/trivy /tmp/uploads # Set environment variables ENV PYTHONUNBUFFERED=1 ENV GRADIO_SERVER_NAME=0.0.0.0 ENV GRADIO_SERVER_PORT=7860 # Expose port EXPOSE 7860 # Run the application ENTRYPOINT ["python3", "app.py"]