【发布时间】:2021-01-25 08:05:42
【问题描述】:
我使用的是 Windows 10 操作系统。我想构建一个基于 linux 的容器,这样我就可以复制从 ubuntu 开发的代码和依赖项。当我尝试构建它时,会输出上述错误消息。
据我了解,桌面版 docker 在后台运行 linux OS 内核,因此允许窗口用户运行基于 linux 的容器,但不确定为什么会输出此错误。
我的 dockerfile 看起来像这样:
FROM ubuntu:18.04
ENV PATH="/root/miniconda3/bin:${PATH}"
ARG PATH="/root/miniconda3/bin:${PATH}"
RUN apt update \
&& apt install -y htop python3-dev wget
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir root/.conda \
&& sh Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
RUN conda create -y -n ml python=3.7
COPY . src/
RUN /bin/bash -c "cd src \
&& source activate ml \
&& pip install -r requirements.txt"
requirements.txt 包含:
apturl==0.5.2
asn1crypto==0.24.0
bleach==2.1.2
Brlapi==0.6.6
certifi==2020.11.8
chardet==3.0.4
click==7.1.2
command-not-found==0.3
configparser==5.0.1
cryptography==2.1.4
cupshelpers==1.0
dataclasses==0.7
当我运行 docker build 命令时,它会输出:
1.649 ERROR: Could not find a version that satisfies the requirement apturl==0.5.2 1.649 ERROR: No matching distribution found for apturl==0.5.2 删除并运行它会导致另一个错误。所有错误似乎都与 ubuntu 软件包有关。
我不是在运行 ubuntu 容器吗?为什么不允许我安装 ubuntu 包?
谢谢!
【问题讨论】: