繁体   English   中英

docker apt-get 更新错误

[英]docker apt-get update error

我的 dockerfile

FROM node:argon


# Set the locale
RUN apt-get clean && apt-get update
RUN apt-get install locales
RUN locale-gen en_US.UTF-8

10 次中有 9 次,无法使用以下错误构建。

Sending build context to Docker daemon 73.95 MB
Step 1 : FROM node:argon
 ---> 10a26800d95a
Step 2 : RUN apt-get clean && apt-get update
 ---> Running in 5a41dd8ab15e
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [390 kB]
Ign http://httpredir.debian.org jessie InRelease
Err http://httpredir.debian.org jessie Release.gpg
  Error reading from server. Remote end closed connection [IP: 5.153.231.35 80]
Get:3 http://httpredir.debian.org jessie-updates InRelease [142 kB]
Err http://httpredir.debian.org jessie-updates/main amd64 Packages

Get:4 http://httpredir.debian.org jessie Release [148 kB]
Err http://httpredir.debian.org jessie-updates/main amd64 Packages

Get:5 http://httpredir.debian.org jessie/main amd64 Packages [9064 kB]
Err http://httpredir.debian.org jessie-updates/main amd64 Packages

Err http://httpredir.debian.org jessie-updates/main amd64 Packages
  404  Not Found [IP: 5.153.231.35 80]
Fetched 9808 kB in 15s (615 kB/s)
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/Release.gpg  Error reading from server. Remote end closed connection [IP: 5.153.231.35 80]

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found [IP: 5.153.231.35 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get clean && apt-get update' returned a non-zero code: 100

什么都没有改变,有什么想法吗?

我多次构建你的 Dockerfile 没有问题。 尝试重新启动 Docker 服务/实例/机器。

您可能遇到网络问题,因为问题是间歇性的。

你的 Dockerfile 在我的机器上运行完美。 我猜这是由网络连接引起的。 所以请检查您是否在防火墙后面,以及您是否需要设置代理才能访问 Internet。 如果是这样,请将此命令添加到RUN apt-get命令前面的 Dockerfile 中以设置代理ENV http_proxy 'http://<server-address>:<port>'

这发生在我身上只是因为我的系统时钟过去(未同步)的简单原因。 修复时间使此错误消失。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM