安装nodejs返回一个非零的代码:1与docker构build

我正在尝试用下面的dockerfilebuild立一个docker镜像:

FROM ubuntu:16.10 MAINTAINER Fátima Alves COPY ./dist /myprogram/ WORKDIR /myprogram RUN apt-get update \ && \ apt-get install -y \ curl \ && \ curl -sL https://deb.nodesource.com/setup_6.x | bash - \ && \ apt-get install -y \ python-dev \ libxml2-dev \ libxslt1-dev 

不pipe我做什么,这个消息都出现在terminal上:

 curl -sL https://deb.nodesource.com/setup_6.x | bash -' returned a non-zero code: 1 

我没有find任何相关的谷歌。

谢谢!

你有没有尝试运行这个自己看看错误是什么? 像这样:

 $ docker run --rm -it ubuntu:16.10 [...] root@96117efa0948:/# apt-get update [...] root@96117efa0948:/# apt-get install -y curl [...] root@96117efa0948:/# curl -sL https://deb.nodesource.com/setup_6.x | bash - [...] ## Your distribution, identified as "Ubuntu Yakkety Yak (development branch)", is a pre-release version of Ubuntu. NodeSource does not maintain official support for Ubuntu versions until they are formally released. You can try using the manual installation instructions available at https://github.com/nodesource/distributions and use the latest supported Ubuntu version name as the distribution identifier, although this is not guaranteed to work. root@96117efa0948:/# 

所以基本上blurb告诉你,你的Ubunutu版本还不支持。 尝试改变你的configuration文件来使用ubuntu:16.04 – 或者找出一些其他方法来安装节点。