我在 Dockerfile 中使用 pipelinenv 安装 Python 依赖项时遇到问题。
Dockerfile:
RUN pip install --upgrade pip
RUN pip install pipenv
# Copy dependencies source code
WORKDIR /projects
# Copy project source code
WORKDIR /projects/source
COPY ./projects/source .
# Install packages
RUN pipenv install --system --deploy
Run Code Online (Sandbox Code Playgroud)
我们使用以下 pipelinev 依赖项成功构建了映像:
# Result of pip install pipenv
Successfully installed certifi-2023.5.7 distlib-0.3.6 filelock-3.12.2 pipenv-2023.7.11 platformdirs-3.9.1 setuptools-68.0.0 virtualenv-20.24.0 virtualenv-clone-0.5.7
Run Code Online (Sandbox Code Playgroud)
pipenv install --system --deploy但现在,当我们在 Docker 映像中执行以下操作时,我们遇到了此错误:
# Result when executing pipenv install --system --deploy
Traceback (most recent call …Run Code Online (Sandbox Code Playgroud)