HTML2PDF_API / Dockerfile
tomo2chin2's picture
Use official Playwright Docker image
1cb214e verified
raw
history blame contribute delete
529 Bytes
FROM mcr.microsoft.com/playwright/python:v1.40.0-jammy
# 作業ディレクトリを設定
WORKDIR /app
# Python依存関係をインストール
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# アプリケーションファイルをコピー
COPY . .
# 非rootユーザーを作成(playwright imageには既にplaywrightユーザーが存在)
USER pwuser
# ポートを公開
EXPOSE 7860
# アプリケーションを起動
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]