【发布时间】:2023-04-01 18:07:01
【问题描述】:
我正在使用https://courses.cognitiveclass.ai/ 练习 Docker,并尝试运行具有以下内容的Dockerfile
。
FROM python:3.6.1-alpine
RUN pip install flask
CMD ["python","app.py"]
COPY app.py /app.py
我用来运行的命令Dockerfile
sudo docker image build -t python-hello-world .
当我执行此操作时,它只完成了 1/5 步,而 2/5 步失败并出现以下错误。
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-dlih6aks/MarkupSafe/
You are using pip version 9.0.1, however version 21.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The command '/bin/sh -c pip install flask' returned a non-zero code: 1
我需要对Dockerfile
进行任何更改吗?
【问题讨论】:
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:命令“python setup.py egg_info”在 /tmp/pip-build-dlih6aks/MarkupSafe/ 中失败,错误代码为 1 - Python技术站