HTML2PDF_API / Dockerfile
tomo2chin2's picture
Add Dockerfile for Docker Space
c4e055b verified
raw
history blame
695 Bytes
FROM python:3.10-slim
# システム依存関係をインストール
COPY packages.txt .
RUN apt-get update && xargs -r -a packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
# Playwrightブラウザをインストール
RUN pip install playwright==1.40.0
RUN playwright install chromium
RUN playwright install-deps
# 作業ディレクトリを設定
WORKDIR /app
# Python依存関係をインストール
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# アプリケーションファイルをコピー
COPY . .
# ポートを公開
EXPOSE 7860
# アプリケーションを起動
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]