FROM --platform=$TARGETPLATFORM mcr.microsoft.com/playwright/python:v1.38.0-jammy LABEL authors="abearxiong" LABEL mail="xiongxiao@xiongxiao.me" WORKDIR /app COPY server.py . RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends curl # reference -> https://playwright.dev/python/docs/ci#via-containers RUN python -m pip install --upgrade pip \ && pip install fastapi uvicorn xhs playwright \ && rm -rf /var/lib/apt/lists/*รง RUN curl --insecure -L -o stealth.min.js https://cdn.jsdelivr.net/gh/requireCool/stealth.min.js/stealth.min.js EXPOSE 5005 CMD [ "python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5005"]