运行Dockerfile时报错,Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(
出现该报错是因为pip install flask时用的国外的服务器,导致连接失败,因此只需要在Dockerfile文件的pip install flask后面跟上国内的镜像地址就行,如阿里云:
RUN pip3 install flask -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com