小编Shi*_*mar的帖子

从 dockerfile 构建映像时获取“命令 '/bin/sh -c pip install --no-cache-dir -rrequirements.txt' 返回非零代码:1”

这是我的要求.txt

beautifulsoup4==4.11.1
cachetools==5.2.0
certifi==2022.12.7
charset-normalizer==2.1.1
click==8.1.3
colorama==0.4.6
Flask==2.2.2
Flask-SQLAlchemy==3.0.2
google==3.0.0
google-api-core==2.10.2
google-auth==2.14.1
google-cloud-pubsub==2.13.11
googleapis-common-protos==1.57.0
greenlet==2.0.1
grpc-google-iam-v1==0.12.4
grpcio==1.51.1
grpcio-status==1.51.1
idna==3.4
importlib-metadata==5.2.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
NotFound==1.0.2
proto-plus==1.22.1
protobuf==4.21.12
psycopg2==2.9.5
pyasn1==0.4.8
pyasn1-modules==0.2.8
requests==2.28.1
rsa==4.9
six==1.16.0
soupsieve==2.3.2.post1
SQLAlchemy==1.4.45
urllib3==1.26.13
Werkzeug==2.2.2
zipp==3.11.0

Run Code Online (Sandbox Code Playgroud)

这是我的 Dockerfile

FROM python:3.10-slim

# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True

# Copy local code to the container image.
ENV APP_HOME /app
WORKDIR $APP_HOME
COPY . ./


# Install production dependencies.
RUN pip install …
Run Code Online (Sandbox Code Playgroud)

python requirements.txt docker dockerfile azure-pipelines

3
推荐指数
1
解决办法
2万
查看次数