2015-12-30 40 views
0

我使用下列文件泊塢窗Ubuntu的構建文件錯誤

# Version: 0.0.1 
FROM ubuntu 
MAINTAINER Walid Ashraf 
RUN apt-get update 
RUN apt-get upgrade 
RUN apt-get install -y git libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler protobuf-compiler python-protobuf 

我不斷收到以下錯誤建立一個泊塢窗圖片:

Reading package lists... 
Building dependency tree... 
Reading state information... 
E: Unable to locate package libprotobuf-c0-dev 
E: Unable to locate package protobuf-c-compiler 
E: Unable to locate package python-protobuf 
The command '/bin/sh -c apt-get install -y git libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler protobuf-compiler python-protobuf' returned a non-zero code: 100 

回答

0

你可能是磁盤空間。嘗試運行這些命令來清除空間:

docker rm -v $(docker ps -a -q -f status=exited) # remove unused containers 
docker rmi $(docker images -q -f dangling=true) # remove unused images 
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes # remove unused volumes 
0

我添加了安靜和是標誌,它的工作。

# Version: 0.0.1 
FROM ubuntu 
MAINTAINER Walid Ashraf 
RUN apt-get update -q 
RUN apt-get upgrade -y 
RUN apt-get install -y git libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler protobuf-compiler python-protobuf' 

如果你運行的是虛擬化,嘗試用docker-machine restart default重新啓動機器泊塢窗(運行docker-machine ls得到名稱,如果默認情況下不工作)。我發現有時它不能連接到互聯網出於某種原因,這解決了它。