# Base image
FROM python:3.11-slim
# Set work directory
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
# 필수 패키지등 설치
RUN apt-get update && apt-get install -y
# Install Python dependencies
RUN playwright install chromium --with-deps
# Expose the port for FastAPI
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
An error occurs when running Playwright after installing with the above dockfile
It runs normally on other services(render…) or local docker,
but only on koyeb
the error below keeps occurring.
â Looks like you launched a headed browser without having a XServer running. â
â Set either ‘headless: true’ or use ‘xvfb-run ’ before running Playwright. â
Even if you set the headless condition to true,
the error occurs.