安装nodejs返回非零代码:1与docker build [英] installation of nodejs returned a non-zero code: 1 with docker build

查看:142
本文介绍了安装nodejs返回非零代码:1与docker build的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下dockerfile构建docker映像:

I'm trying to build a docker image with the following dockerfile:

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

无论我做什么,该消息都会出现在终端中:

And no matter what i do, this message is appearing in the terminal:

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

我在Google中找不到任何相关内容。

I'm not finding anything related in google.

谢谢!

推荐答案

您是否尝试过自己运行此程序以查看错误是什么?像这样:

Have you tried running this yourself to see what the error is? Like so:

$ 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。尝试更改配置文件以使用ubuntu:16.04-或找出其他方法来安装节点。

So basically that blurb is telling you that your version of Ubunutu isn't supported yet. Try changing your config file to use ubuntu:16.04 - or work out some other way to install node.

这篇关于安装nodejs返回非零代码:1与docker build的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆