# Use an official Python image from Docker Hub FROM python:3.9-slim # Set the working directory inside the container WORKDIR /app # Install system dependencies RUN apt-get update && \ apt-get install -y \ git \ unzip \ curl \ xz-utils \ libssl-dev \ libreadline-dev \ libyaml-dev \ libsqlite3-dev \ sqlite3 \ libbz2-dev \ libgdbm-dev \ libncurses5-dev \ libncursesw5-dev \ libffi-dev \ liblzma-dev \ libmagic-dev \ make \ clang \ cmake \ xcode-select \ && rm -rf /var/lib/apt/lists/* # Install Fastlane RUN curl -sL https://dl.bintray.com/fastlane/fastlane/install | bash # Create directories with write permissions RUN mkdir -p /app/icons /app/builds && \ chmod -R 777 /app/icons /app/builds # Copy the FastAPI app files to the container COPY . /app # Install FastAPI and Uvicorn RUN pip install --no-cache-dir -r requirements.txt # Expose the port the app will run on EXPOSE 8000 # Run the app under root to avoid permission issues in the app folder USER root # Start the FastAPI app CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]