摘要:
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.
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://systransis.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 ...
摘要:一參考資源網(wǎng)址官網(wǎng)資源站資源站頁國內(nèi)用戶文章二開始部署基礎(chǔ)環(huán)境安裝等。安裝官網(wǎng)下載安裝即可。到安裝目的的文件夾運行啟動服務(wù)。修改結(jié)果如下說明是的數(shù)據(jù)庫地址,請確保該地址正確。解決辦法是將導(dǎo)入的數(shù)據(jù)重新導(dǎo)出或,將會獲得包含的數(shù)據(jù)。 一、參考資源網(wǎng)址1、http://parseplatform.org/#server 官網(wǎng)2、https://github.com/parse-comm......
摘要:權(quán)衡性價比之后,決定采取最后一種方案。它們分別用于處理流入結(jié)點之前的數(shù)據(jù),和結(jié)點之后的數(shù)據(jù)。這時對數(shù)據(jù)庫進(jìn)行簡單的操作檢查數(shù)據(jù)是否如自己預(yù)期地被寫入了指定數(shù)據(jù)庫。 Chap.1 萬萬沒想到,我這一世英名葬送在了地圖坑里 繼上次搭建完框架得到了個粗糙的demo以后,基本的圖形組件試了個遍沒什么阻力。我天真地以為我離真理的距離簡直就只有一步之遙了。 ?想著我還有些模擬的地理數(shù)據(jù)沒有做可視化...
閱讀 2958·2021-11-23 09:51
閱讀 1675·2021-10-15 09:39
閱讀 1068·2021-08-03 14:03
閱讀 2897·2019-08-30 15:53
閱讀 3445·2019-08-30 15:52
閱讀 2494·2019-08-29 16:17
閱讀 2801·2019-08-29 16:12
閱讀 1657·2019-08-29 15:26