码头与凉亭,咕噜声

时间:2015-01-19 21:26:44

标签: gruntjs docker bower

我正在尝试用咕噜声和凉亭建造一个码头图像,但我得到了 以下异常

2015/01/19 23:21:55命令[/ bin / sh -c grunt]返回非零代码:1

也为凉亭打印了类似的例外情况。 我的Dockerfile就像。

可能是什么问题?

FROM    ubuntu:14.04

RUN     apt-get update
RUN     apt-get install -y node npm git git-core
RUN     ln -s /usr/bin/nodejs /usr/bin/node
COPY    . /app

WORKDIR /app

RUN     npm install -g bower 
RUN     npm install -g grunt-cli
RUN     npm install 
# RUN     bower install 
RUN     grunt 
RUN     grunt serve
EXPOSE  9000

顺便说一句。我没有掌握所有这些码头工作的东西。 我用

输入图像
docker run -t -i a87274a7f3b7  /bin/bash

和jast run

grunt

但没有任何事情发生,它什么都不做,也没有任何错误。

编辑 这个似乎工作

FROM    ubuntu:14.04

RUN     apt-get update
RUN     apt-get install -y nodejs npm git git-core
RUN     ln -s /usr/bin/nodejs /usr/bin/node
COPY    . /app

WORKDIR /app

RUN     npm install -g bower 
RUN     npm install -g grunt-cli
RUN     npm install 
RUN     bower install --allow-root
RUN     grunt 
RUN     grunt serve
EXPOSE  9000

1 个答案:

答案 0 :(得分:3)

在Ubuntu存储库节点不是nodejs,它是一个名为ax25-node的ham无线节点程序,它安装为/ usr / sbin / node。 Grunt然后感到困惑,因为它只是一个带有shebang #!/usr/bin/env node的脚本,并且会在node上执行等同于$PATH的任何内容。

修复:

替换

RUN     apt-get install -y node npm git git-core

RUN     apt-get install -y nodejs npm git git-core
相关问题