Skip to content

Commit

Permalink
add playwright deps
Browse files Browse the repository at this point in the history
  • Loading branch information
xueyikang committed Jan 3, 2024
1 parent c1bc845 commit 15eedb3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@ FROM python:3.8.18-slim

ENV PYTHONUNBUFFERED 1

RUN apt-get update && apt-get upgrade -y && apt-get install -y gcc && apt-get install -y ffmpeg
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y gcc && \
apt-get install -y ffmpeg && \
apt-get install -y libnss3 && \
apt-get install -y libnspr4 && \
apt-get install -y libatk1.0-0 && \
apt-get install -y libatk-bridge2.0-0 && \
apt-get install -y libcups2 && \
apt-get install -y libatspi2.0-0 && \
apt-get install -y libxcomposite1 && \
apt-get install -y libxdamage1

# 更新pip
RUN pip install --upgrade pip --index-url http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
Expand All @@ -16,6 +27,8 @@ RUN pip install -r requirements.txt --index-url http://mirrors.aliyun.com/pypi/s

RUN playwright install chromium

RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# 打开容器的8000端口
EXPOSE 8000

Expand Down

0 comments on commit 15eedb3

Please sign in to comment.