摘要:
Docker File
Create this file with the name Dockerfile and put into your project root folder.
# specify the node base image with your desired version node:Important in the Docker FileFROM node:8 WORKDIR /app RUN chown -R node:node /usr/local/lib/node_modules RUN chown -R node:node /usr/local/bin USER node RUN npm install node-red -g RUN npm install node-red-node-mongodb -g RUN npm i node-red/node-red-dashboard -g # port 1880 for node-red-dashboard EXPOSE 1880 CMD node-red
You need to include the -g behind, as if you don"t the package won"t be installed.
RUN npm install node-red -g RUN npm install node-red-node-mongodb -g RUN npm i node-red/node-red-dashboard -g
However, there will be permission error if you just do that. So you need to change the owner and switch the user before that.
RUN chown -R node:node /usr/local/lib/node_modules RUN chown -R node:node /usr/local/bin USER nodeThe Joy
Then you can build using docker build -t nodejs .
After running the docker image using docker run -it -p 1880:1880 nodejs
You can now access the node-red in your browser.
Btw, you could map multiple ports from the container to host by using multiple -p option.
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/26998.html
摘要: Docker File Create this file with the name Dockerfile and put into your project root folder. # specify the node base image with your desired version node: FROM node:8 WORKDIR /app RUN chown -...
Create App and build docker image Create a file of the name Dockerfile with the content below and put into your project root folder. # specify the node base image with your desired version node: FROM ...
Create App and build docker image Create a file of the name Dockerfile with the content below and put into your project root folder. # specify the node base image with your desired version node: FROM ...
摘要:一参考资源网址官网资源站资源站页国内用户文章二开始部署基础环境安装等。安装官网下载安装即可。到安装目的的文件夹运行启动服务。修改结果如下说明是的数据库地址,请确保该地址正确。解决办法是将导入的数据重新导出或,将会获得包含的数据。 一、参考资源网址1、http://parseplatform.org/#server 官网2、https://github.com/parse-comm......
摘要:权衡性价比之后,决定采取最后一种方案。它们分别用于处理流入结点之前的数据,和结点之后的数据。这时对数据库进行简单的操作检查数据是否如自己预期地被写入了指定数据库。 Chap.1 万万没想到,我这一世英名葬送在了地图坑里 继上次搭建完框架得到了个粗糙的demo以后,基本的图形组件试了个遍没什么阻力。我天真地以为我离真理的距离简直就只有一步之遥了。 想着我还有些模拟的地理数据没有做可视化...
阅读 2929·2021-11-23 09:51
阅读 1637·2021-10-15 09:39
阅读 1044·2021-08-03 14:03
阅读 2852·2019-08-30 15:53
阅读 3428·2019-08-30 15:52
阅读 2461·2019-08-29 16:17
阅读 2757·2019-08-29 16:12
阅读 1628·2019-08-29 15:26