FROM --platform=linux/amd64 docker.io/tnk4on/yt-dlp:latest@sha256:3a33a548bf949d3c67e77056efa9972ccdfeac3d56e6006b6c91ad83990aa33a # Install required packages RUN apk update && apk add --no-cache \ python3 \ python3-dev \ py3-pip \ gcc \ musl-dev \ libffi-dev # Set working directory WORKDIR /app # Copy and install requirements COPY requirements.txt . RUN pip3 install --no-cache-dir -r requirements.txt # Create directories and set permissions RUN mkdir -p /downloads && \ chmod 777 /downloads && \ mkdir -p /tmp && \ chmod 777 /tmp # Copy app COPY app.py . # Environment variables ENV GRADIO_SERVER_NAME=0.0.0.0 ENV GRADIO_SERVER_PORT=7860 ENV PYTHONUNBUFFERED=1 # Expose port for Gradio EXPOSE 7860 # Set entrypoint to run Gradio app CMD ["python3", "app.py"]