成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專欄INFORMATION COLUMN

Deploy NodeJS with node-red, mongodb, dashboard in

iKcamp / 1646人閱讀

摘要:

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 -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
Important in the Docker File

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 node
The 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.

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉載請注明本文地址:http://systransis.cn/yun/19085.html

相關文章

  • Deploy NodeJS with node-red, mongodb, dashboard in

    摘要: 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 -...

    cgh1999520 評論0 收藏0
  • Deploy NodeJS Docker to QiO Edge Cloud using Kuber

    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 ...

    W4n9Hu1 評論0 收藏0
  • Deploy NodeJS Docker to QiO Edge Cloud using Kuber

    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 ...

    lentoo 評論0 收藏0
  • parse-server和parse-dashboard安裝及阿里云express部署

    摘要:一參考資源網址官網資源站資源站頁國內用戶文章二開始部署基礎環(huán)境安裝等。安裝官網下載安裝即可。到安裝目的的文件夾運行啟動服務。修改結果如下說明是的數(shù)據庫地址,請確保該地址正確。解決辦法是將導入的數(shù)據重新導出或,將會獲得包含的數(shù)據。 一、參考資源網址1、http://parseplatform.org/#server 官網2、https://github.com/parse-comm......

    pcChao 評論0 收藏0
  • IoT實時數(shù)據可視化方案(進階版):Worldmap Panel使用詳解及使用Node-RED進行流

    摘要:權衡性價比之后,決定采取最后一種方案。它們分別用于處理流入結點之前的數(shù)據,和結點之后的數(shù)據。這時對數(shù)據庫進行簡單的操作檢查數(shù)據是否如自己預期地被寫入了指定數(shù)據庫。 Chap.1 萬萬沒想到,我這一世英名葬送在了地圖坑里 繼上次搭建完框架得到了個粗糙的demo以后,基本的圖形組件試了個遍沒什么阻力。我天真地以為我離真理的距離簡直就只有一步之遙了。 ?想著我還有些模擬的地理數(shù)據沒有做可視化...

    qingshanli1988 評論0 收藏0

發(fā)表評論

0條評論

iKcamp

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<