FROM python:3.10-alpine
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
ENTRYPOINT ["python3","main.py"]
之前的dockerfile使用python3.9版本, 不支持的python语法格式会出现以下问题
Traceback (most recent call last):
File "/app/main.py", line 5, in <module>
from api.base import Chaoxing, Account
File "/app/api/base.py", line 20, in <module>
from api.answer import *
File "/app/api/answer.py", line 37, in <module>
class Tiku:
File "/app/api/answer.py", line 86, in Tiku
def config_set(self,config:configparser.ConfigParser|None):
TypeError: unsupported operand type(s) for |: 'ABCMeta' and 'NoneType'
Dockerfile
Usage
Q
是否接受添加dockerfile的PR?