2016-09-29 49 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