Node.js docker apt获取更新错误

Node.js docker apt获取更新错误,node.js,docker,Node.js,Docker,我的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 ---> 10a

我的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在我的机器上运行得很好。我想这是由网络连接造成的。因此,请检查您是否在防火墙后面,以及是否需要设置代理才能访问Internet。如果是这样,请将此命令添加到Dockerfile中,然后运行apt get命令以设置代理
ENV http_proxy'http://:'
您的Dockerfile在我的机器上运行正常。我想这是由网络连接造成的。因此,请检查您是否在防火墙后面,以及是否需要设置代理才能访问Internet。如果是这样,请将此命令添加到Dockerfile中,然后运行apt get命令设置代理
ENV http_proxy'http://:'
我多次构建了您的Dockerfile,没有问题。尝试重新启动Docker服务/实例/计算机


您可能有网络问题,因为该问题是间歇性的

我多次构建了您的Dockerfile,没有问题。尝试重新启动Docker服务/实例/计算机


您可能有网络问题,因为该问题是间歇性的

发生这种情况的原因很简单,就是我的系统时钟过去了(没有同步)。修正时间使这个错误消失。

这发生在我身上只是因为我的系统时钟过去了(没有同步)。固定时间使此错误消失