Spaces:
Sleeping
Sleeping
File size: 724 Bytes
8a9c3e9 9012752 8a9c3e9 9012752 8a9c3e9 9012752 8a9c3e9 9012752 54ef49b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 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"]
|