Scrape / Dockerfile
maylinejix's picture
Update Dockerfile
7344de1 verified
raw
history blame contribute delete
852 Bytes
FROM python:3.10-slim
RUN apt-get update && apt-get install -y \
wget \
gnupg \
unzip \
curl \
ca-certificates \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome-keyring.gpg \
&& sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN playwright install chromium
RUN playwright install-deps
COPY app.py .
RUN mkdir -p public
EXPOSE 7860
CMD ["python", "app.py"]