# Use an official Python runtime as a parent image FROM python:3.9-slim # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ curl \ unzip \ git \ solc \ && rm -rf /var/lib/apt/lists/* # Install Slither (static analysis tool for Solidity) RUN curl -L https://github.com/trailofbits/slither/releases/download/v0.11.0/slither-v0.11.0-linux-x86_64.tar.bz2 -o slither.tar.bz2 && \ tar -xvjf slither.tar.bz2 && \ mv slither /usr/local/bin && \ rm slither.tar.bz2 # Create and set working directory WORKDIR /app # Copy the current directory contents into the container at /app COPY . /app # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose the port FastAPI will run on EXPOSE 8000 # Command to run the app CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]