当我尝试构建 Dockerfile 时遇到此错误。我该如何解决这个问题?
未能计算缓存密钥:“/Pipfile.lock”未找到:未找到
# Pull base image
FROM python:3.9
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /code
# Install dependencies
COPY Pipfile Pipfile.lock /code/
RUN pip install pipenv && pipenv install --system
# Copy project
COPY . /code/
答案 0 :(得分:0)
你的 Dockerfile 必须在你的 hello 目录中
我遇到了同样的问题,因为我的桌面中有我的 docker 文件 所以我将我的 Dockerfile 移到了我的 hello 目录(即你的项目目录)并且它工作正常!