我正在使用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
Run Code Online (Sandbox Code Playgroud)
我用来运行的命令Dockerfile
sudo docker image build -t python-hello-world .
Run Code Online (Sandbox Code Playgroud)
当我执行此操作时,它只完成了 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
Run Code Online (Sandbox Code Playgroud)
我需要添加任何更改吗Dockerfile? …