我试图通过AWS am遵循一些简单的Docker教程[1][2],但是出现了以下错误:
> docker build -t my-app-image .
Sending build context to Docker daemon 94.49 MB
Step 1 : FROM amazon/aws-eb-python:3.4.2-onbuild-3.5.1
# Executing 2 build triggers...
Step 1 : ADD . /var/app
---> Using cache
Step 1 : RUN if [ -f /var/app/requirements.txt ]; then /var/app/bin/pip install -r /var/app/requirements.txt; fi
---> Running in d48860787e63
/bin/sh: 1: /var/app/bin/pip: not found
The command '/bin/sh -c if [ -f /var/app/requirements.txt ]; then /var/app/bin/pip install -r /var/app/requirements.txt; fi' returned a non-zero code: 127
Dockerfile:
# For Python 3.4
FROM amazon/aws-eb-python:3.4.2-onbuild-3.5.1
哪个pip会返回以下结果:
> which pip
./bin/pip
相关文件结构:
.
├── Dockerfile
├── bin
│ ├── activate
│ ├── pip
│ ├── pip3
│ ├── pip3.5
│ ├── python -> python3
│ ├── python-config
│ ├── python3
│ ├── python3.5 -> python3
│ .
.
我对 Docker 的所有内容都很陌生,因此不确定应该采取哪些故障排除步骤。请告诉我需要提供哪些其他有用的信息。
which pip
命令的?你的 Dockerfile 目录下是否存在bin/pip
文件? - jwodderwhich pip
命令?是在构建 Docker 镜像的操作系统中,还是在 Docker 容器内部? - fghj