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