【问题标题】:Docker build: unable to fetch archivesDocker 构建:无法获取档案
【发布时间】:2017-01-23 21:48:51
【问题描述】:

我在我的 Windows 机器上使用 docker 工具箱。我正在尝试从 github https://github.com/pyannote/pyannote-video 构建这个项目。当我通过运行docker build -t pyannote/video . 构建映像时,出现以下错误:

Get:17 http://archive.ubuntu.com/ubuntu/ trusty-updates/main python-setuptools all 3.3-1ubuntu2 [230 kB]
Err http://archive.ubuntu.com/ubuntu/ trusty-updates/universe python-pip all 1.5.4-1ubuntu3
  404  Not Found [IP: 91.189.88.149 80]
Fetched 1658 kB in 21s (78.5 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip-whl_1.5.4-1ubuntu3_all.deb  404  Not Found [IP: 91.189.88.1
9 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip_1.5.4-1ubuntu3_all.deb  404  Not Found [IP: 91.189.88.149 8
]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends     python     python-dev     python-pip' returned
a non-zero code: 100

我查看了http://archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/。有 python-pip_1.5.4-1ubuntu4_all.deb 而不是 python-pip_1.5.4-1ubuntu3_all.deb。

输出要求我运行 apt-get update 或尝试使用 --fix-missing,但我在 Windows 上运行 docker。运行 apt-get 将返回找不到命令。我应该怎么做才能解决这个问题?

【问题讨论】:

    标签: ubuntu docker


    【解决方案1】:

    编辑 Dockerfile 并更改第 5 行:

    RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
    

    到这里:

    RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -yq --no-install-recommends \
                                       ^ Add this part ^
    

    然后告诉编写该 Dockerfile 的人阅读 this

    【讨论】:

    • 他在windows上运行docker,windows下不能运行linux容器吧?
    • @Farhad:如果您所说的“Linux 容器”是指LXC,那么这个答案与此无关。如果您只是指一般的容器化 Linux 实例,您认为 Docker 是什么?
    • 我的意思是windows中安装的docker下的容器化Linux实例。 stackoverflow.com/questions/33190469/…
    • @Farhad:阅读那里答案的第二段:“您当然可以通过 VM 在任何 Windows 机器上运行这些 Linux 容器。这就是 docker 工具箱将安装的。”并且 OP 正在使用 Docker Toolbox。
    • 感谢您的信息,vm 是通过 boot2docker 启动的,可能不是最好的想法性能明智。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-18
    • 2022-12-04
    • 1970-01-01
    • 2017-09-15
    • 2021-12-24
    • 2019-07-17
    • 1970-01-01
    相关资源
    最近更新 更多