mirror of
https://github.com/Xtao-Labs/QQ-GitHub-Bot.git
synced 2025-01-31 07:31:26 +00:00
25 lines
951 B
Docker
25 lines
951 B
Docker
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
|
|
|
|
RUN python3 -m pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
|
|
|
|
RUN python3 -m pip install poetry && poetry config virtualenvs.create false
|
|
|
|
COPY ./pyproject.toml ./poetry.lock* /app/
|
|
|
|
RUN poetry export --without-hashes -f requirements.txt \
|
|
| poetry run pip install -r /dev/stdin \
|
|
&& poetry install --no-dev \
|
|
&& echo "Install playwright headless browser..." \
|
|
&& poetry run playwright install
|
|
|
|
COPY ./download_wkhtmltox.sh /app/
|
|
|
|
RUN echo "deb http://mirrors.aliyun.com/debian/ buster main contrib non-free" >> /etc/apt/sources.list\
|
|
&& echo "deb http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free" >> /etc/apt/sources.list\
|
|
&& apt-get update
|
|
|
|
RUN echo "Install wkhtmltox renderer..." \
|
|
&& ./download_wkhtmltox.sh buster_amd64 \
|
|
&& apt-get install -y xvfb ./wkhtmltox_*.deb\
|
|
&& rm wkhtmltox_*.deb download_wkhtmltox.sh
|