mirror of
https://github.com/PaiGramTeam/Docker.git
synced 2024-11-25 06:47:40 +00:00
Create Dockerfile
This commit is contained in:
parent
17fc022507
commit
6ebe7a9392
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
FROM python:3.10.10-buster
|
||||
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
||||
LANG=zh_CN.UTF-8 \
|
||||
SHELL=/bin/bash
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
WORKDIR /app
|
||||
RUN echo "deb http://ftp.us.debian.org/debian buster main non-free" >> /etc/apt/sources.list.d/fonts.list \
|
||||
&& apt update \
|
||||
# clone
|
||||
&& apt install git wget curl -y \
|
||||
&& git clone -b main https://github.com/luoshuijs/TGPaimonBot.git /app \
|
||||
# install dependencies \
|
||||
&& pip install virtualenv poetry \
|
||||
&& python3 -m virtualenv venv/ \
|
||||
&& . venv/bin/activate \
|
||||
&& poetry source add --default mirrors https://pypi.tuna.tsinghua.edu.cn/simple/ \
|
||||
&& poetry install \
|
||||
&& poetry install --extras all \
|
||||
&& playwright install chromium \
|
||||
&& playwright install-deps chromium \
|
||||
## set timezone
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo "Asia/Shanghai" > /etc/timezone \
|
||||
# create cache folder
|
||||
&& mkdir cache/ \
|
||||
# clean
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
~/.cache \
|
||||
# Add the wait script to the image
|
||||
&& wget -O /wait https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait \
|
||||
&& chmod +x /wait
|
||||
ENTRYPOINT /wait && /app/venv/bin/python run.py
|
Loading…
Reference in New Issue
Block a user