2014-07-26 85 views
0

我正在使用Linux Mint 17計算機,並且第一次使用Docker,因此請耐心等待。無法從Dockerfile構建容器

我剛裝碼頭工人是這樣的(基本上就是跟着文檔):

sudo apt-get install docker.io 
sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker 
sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io 

然後我嘗試建立我的容器:

docker build -t myproject . 

但我收到此錯誤信息:

[email protected]:~/workspace/myproj > docker build -t myproject . 
Uploading context 94.72 kB 
Uploading context 
Step 0 : FROM ubuntu:14.04 
---> ba5877dc9bec 
Step 1 : RUN apt-get update && apt-get install -y php5-cli php5-dev php-pear wget build-essential 
---> Running in 729afe65b3f5 
2014/07/26 18:38:05 no such file or directory 
2014/07/26 20:38:05 The command [/bin/sh -c apt-get update && apt-get install -y php5-cli php5-dev php-pear wget build-essential] returned a non-zero code: 1 
[email protected]:~/workspace/myproject > 

這是Dockerfile的樣子:

FROM ubuntu:14.04 

RUN apt-get update && apt-get install -y php5-cli php5-dev php-pear wget build-essential 
RUN wget http://www.xmailserver.org/libxdiff-0.23.tar.gz && tar xvzf libxdiff-0.23.tar.gz && cd libxdiff-0.23 && ./configure && make && make install 
RUN pecl install xdiff-1.5.2 
RUN echo extension=xdiff.so >> /etc/php5/cli/conf.d/xdiff.ini 
RUN php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/bin --filename=composer 

WORKDIR /app 
ENV PORT 5000 
CMD composer install && php bin/server.php 

錯誤信息,如上圖所示,說:

no such file or directory 
The command [/bin/sh -c apt-get update && apt-get install -y php5-cli php5-dev php-pear wget build-essential] returned a non-zero code: 1 

,但我真的不知道我錯過究竟是不存在的或者是什麼。

回答

0

我安裝了lxc,再次嘗試構建容器並運行。

sudo apt-get install lxc