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