嗨,我在创建 docker 镜像(windows)时遇到这个错误,
error: could not install packages due to an oserror: [errno 2] no such file or directory: '/home/ktietz/src/ci/alabaster_1611921544520/work'
这是我的 Dockerfile,
# start by pulling the python image
FROM python:3.8-alpine
# update pip to minimize dependency errors
RUN pip install --upgrade pip
# copy the requirements file into the image
COPY ./requirements.txt /app/requirements.txt
# switch working directory
WORKDIR /app
# install the dependencies and packages in the requirements file
RUN pip install -r requirements.txt
# copy every content from the local file to the image
COPY . /app
# configure the container to run in an executed manner
ENTRYPOINT [ "python" ]
CMD ["view.py" ]
我使用
pip freeze > requirements.txt
cmd 来获取我的 conda 环境中的依赖项。但是它创建了许多我没有使用的依赖项。
如果有人能帮助我,我将不胜感激。