2024-05-07 17:58:55 +08:00
|
|
|
FROM python:3.8-slim-bullseye
|
2023-03-09 00:24:53 +08:00
|
|
|
|
|
|
|
RUN pip3 --no-cache-dir install nb-cli
|
|
|
|
|
|
|
|
ENV TZ=Asia/Shanghai \
|
|
|
|
DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
RUN ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && \
|
|
|
|
echo ${TZ} > /etc/timezone && \
|
|
|
|
dpkg-reconfigure --frontend noninteractive tzdata
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y git && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
WORKDIR /data/pkg
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN sed -i 's/^\-\-index\-url\s.*$//' requirements.txt && \
|
|
|
|
pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
|
2023-03-09 09:57:23 +08:00
|
|
|
RUN playwright install-deps && \
|
|
|
|
playwright install chromium && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2024-05-24 21:49:48 +08:00
|
|
|
CMD ["nb", "run"]
|