ubuntu - Docker 构建 : unable to fetch archives

标签 ubuntu docker

我在我的 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 将返回找不到命令。我应该怎么做才能解决这个问题?

最佳答案

编辑 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 .

关于ubuntu - Docker 构建 : unable to fetch archives,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39518377/

相关文章:

linux - Cron 作业未在 Ubuntu VM 上触发

python - Docker 容器 - 源文件消失

mysql - Kubernetes Docker/MySQL 一项服务中的多个数据库

docker - 重命名Docker检查点

docker - 带窗口的鼠尾草

python - AWS DynamoDB Python 连接错误

java - 详细 Rexster 输出/记录错误 `null`

python - 安装 Python 3.6.5 但在 Docker 中获得 Python 3.6.6

ubuntu - 如何在 Ubuntu 下对 init.d 脚本进行排序

ruby-on-rails - 如何在 docker 上安装 Ruby?