我在窗口上使用docker。 以下是我的docker文件:
FROM microsoft/windowsservercore:latest
FROM python:3.7
RUN pip install flask
CMD ["cmd"]
当我尝试构建docker映像时,它会抛出以下异常:
>docker build D:\HCL\Docker\
Sending build context to Docker daemon 14.34kB
Step 1/4 : FROM microsoft/windowsservercore:latest
---> ea9f7aa13d03
Step 2/4 : FROM python:3.7
---> 2137b5b81384
Step 3/4 : RUN pip install flask
---> Running in 7463787fcfa8
Collecting flask
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
Could not find a version that satisfies the requirement flask (from versions: )
No matching distribution found for flask
The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; pip install flask' returned a non-zero code: 1