我正在尝试在Docker容器中安装kurento媒体服务器和一个教程。
Kurento媒体服务器安装指南:
http://doc-kurento.readthedocs.io/en/stable/installation_guide.html
Kurento Tutorial安装:(使用node.js):
http://doc-kurento.readthedocs.io/en/stable/tutorials/node/tutorial-one2one.html
首先我尝试在ubuntu机器上安装相同的,手动执行每个命令,以便我可以看到它正常工作。
但是当我尝试安装相同的内部docker容器时,它无法正常工作。
Dockerfile如下:
FROM ubuntu:14.04
MAINTAINER USER1 "USER1@infinte.com"
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q python-software-properties software-properties-common
RUN apt-get install wget -y
RUN apt-get install git -y
RUN apt-get install curl -y
RUN echo "deb http://ubuntu.kurento.org trusty kms6" | sudo tee /etc/apt/sources.list.d/kurento.list
RUN wget -O - http://ubuntu.kurento.org/kurento.gpg.key | sudo apt-key add -
RUN apt-get update -y
RUN apt-get install kurento-media-server-6.0 -y
RUN sudo service kurento-media-server-6.0 start
RUN sudo service kurento-media-server-6.0 stop
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
RUN sudo apt-get install -y nodejs -y
RUN sudo npm install -g bower -y
RUN git clone https://github.com/Kurento/kurento-tutorial-node.git
RUN cd kurento-tutorial-node/kurento-one2one-call && pwd
RUN cd kurento-tutorial-node/kurento-one2one-call && git checkout 6.1.0
RUN sudo service kurento-media-server-6.0 start
RUN sudo apt-get install build-essential -y
RUN apt-get install python2.7-dev -y
RUN apt-get update -y
RUN cd kurento-tutorial-node/kurento-one2one-call && sudo npm install
EXPOSE 8443
我收到的错误如下:
npm install命令期间发生错误。
Step 25 : RUN cd kurento-tutorial-node/kurento-one2one-call && npm install
---> Running in d8c66e73f94f
> utf-8-validate@1.1.0 install /kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild
make: Entering directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/utf-8-validate/build'
npm WARN cannot run in wd ws@0.4.32 (node-gyp rebuild 2> builderror.log) || (exit 0) (wd=/kurento-tutorial-node/kurento-one2one-call/node_modules/kurento-client/node_modules/reconnect-ws/node_modules/websocket-stream/node_modules/ws)
> bufferutil@1.1.0 install /kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
make: Entering directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
COPY Release/bufferutil.node
make: Leaving directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/ws/node_modules/bufferutil/build'
> ws@0.4.32 install /kurento-tutorial-node/kurento-one2one-call/node_modules/kurento-client/node_modules/kurento-jsonrpc/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/kurento-client/node_modules/kurento-jsonrpc/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory `/kurento-tutorial-node/kurento-one2one-call/node_modules/kurento-client/node_modules/kurento-jsonrpc/node_modules/ws/build'
npm WARN cannot run in wd kurento-one2one-call@6.1.0 cd static && bower install (wd=/kurento-tutorial-node/kurento-one2one-call)
minimist@1.2.0 node_modules/minimist
似乎错误在于node.js部分,有人帮我修复了。
答案 0 :(得分:0)
我可以通过之前收到的错误。
需要更改npm install命令,如下所示:
npm install --unsafe-perm
所以我可以通过错误。