2016-09-29 153 views
0

我dockerfile搬运工apt-get的更新错误

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 

9个10倍,它不能与下面的错误建成。

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 

没有什么变化,有什么想法吗?

回答

1

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

+0

谢谢。这是一个网络问题 – Hammer

2

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

由于问题是间歇性的,您可能会遇到网络问题。

+0

tks,它重新启动后工作 – Hammer