我正在使用Linux Mint 17机器,我第一次使用Docker,所以请耐心等待。
我刚刚安装了Docker(基本上只是按照文档说明):
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 .
但我收到此错误消息:
ricardo@toshi:~/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
ricardo@toshi:~/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 :(得分:0)
我安装了lxc
,再次尝试构建容器并且工作正常。
sudo apt-get install lxc