Push a node-red flow to a docker container










0














I've began using pretty recently both node-red and docker separately, so hope this question doesn't offend anyone.



Going straight to the point: I would like to use a docker container of a node-red flow as an IoT azure edge module to link both the IoT hub I've been using with a pre-existing docker image and the node-red flow I've built for a specific project, but I'm unsure this is possible.



I've found documentation about using node-red running under docker and installing custom plug-ins, but them all miss the image part itself (how to push it to my docker hub). My question then is how to push an existing node-red flow to a Docker hub to be used on its own.



Thanks!










share|improve this question




























    0














    I've began using pretty recently both node-red and docker separately, so hope this question doesn't offend anyone.



    Going straight to the point: I would like to use a docker container of a node-red flow as an IoT azure edge module to link both the IoT hub I've been using with a pre-existing docker image and the node-red flow I've built for a specific project, but I'm unsure this is possible.



    I've found documentation about using node-red running under docker and installing custom plug-ins, but them all miss the image part itself (how to push it to my docker hub). My question then is how to push an existing node-red flow to a Docker hub to be used on its own.



    Thanks!










    share|improve this question


























      0












      0








      0







      I've began using pretty recently both node-red and docker separately, so hope this question doesn't offend anyone.



      Going straight to the point: I would like to use a docker container of a node-red flow as an IoT azure edge module to link both the IoT hub I've been using with a pre-existing docker image and the node-red flow I've built for a specific project, but I'm unsure this is possible.



      I've found documentation about using node-red running under docker and installing custom plug-ins, but them all miss the image part itself (how to push it to my docker hub). My question then is how to push an existing node-red flow to a Docker hub to be used on its own.



      Thanks!










      share|improve this question















      I've began using pretty recently both node-red and docker separately, so hope this question doesn't offend anyone.



      Going straight to the point: I would like to use a docker container of a node-red flow as an IoT azure edge module to link both the IoT hub I've been using with a pre-existing docker image and the node-red flow I've built for a specific project, but I'm unsure this is possible.



      I've found documentation about using node-red running under docker and installing custom plug-ins, but them all miss the image part itself (how to push it to my docker hub). My question then is how to push an existing node-red flow to a Docker hub to be used on its own.



      Thanks!







      node.js azure docker node-red






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 12 at 15:31

























      asked Nov 12 at 15:16









      Arduino

      477




      477






















          1 Answer
          1






          active

          oldest

          votes


















          0














          When you edit the Dockerfile to add your own package.json to add the extra nodes you can also add a flow.json file to /data and Node-RED will load this flow when the container is started.



          Otherwise you can just connect to the web editor as normal to edit the existing flow.






          share|improve this answer






















          • Thanks for the reply @hardillb! You mean opening a shell in the container and replacing package.json by my previous flow.json? How is that done in the command shell?
            – Arduino
            Nov 12 at 19:01






          • 2




            No, I mean either mounting flow.json as a volume or rebuilding the Docker container from the Dockerfile and adding the file to the image
            – hardillb
            Nov 12 at 19:04










          • The second part of your reply is another issue I'm facing; when running nodeRed through docker I'm unable to connect to the web editor normally as when running it through my cmd. I guess it has to do with the IP I'm browsing, but none have worked (127.0.0.1:1800 nor my local/public IP). Any ideas why?
            – Arduino
            Nov 12 at 21:13










          • You said you had deployed the docker container in Azure, so why would you try and connect to your local machine?
            – hardillb
            Nov 13 at 7:02










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53265088%2fpush-a-node-red-flow-to-a-docker-container%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          When you edit the Dockerfile to add your own package.json to add the extra nodes you can also add a flow.json file to /data and Node-RED will load this flow when the container is started.



          Otherwise you can just connect to the web editor as normal to edit the existing flow.






          share|improve this answer






















          • Thanks for the reply @hardillb! You mean opening a shell in the container and replacing package.json by my previous flow.json? How is that done in the command shell?
            – Arduino
            Nov 12 at 19:01






          • 2




            No, I mean either mounting flow.json as a volume or rebuilding the Docker container from the Dockerfile and adding the file to the image
            – hardillb
            Nov 12 at 19:04










          • The second part of your reply is another issue I'm facing; when running nodeRed through docker I'm unable to connect to the web editor normally as when running it through my cmd. I guess it has to do with the IP I'm browsing, but none have worked (127.0.0.1:1800 nor my local/public IP). Any ideas why?
            – Arduino
            Nov 12 at 21:13










          • You said you had deployed the docker container in Azure, so why would you try and connect to your local machine?
            – hardillb
            Nov 13 at 7:02















          0














          When you edit the Dockerfile to add your own package.json to add the extra nodes you can also add a flow.json file to /data and Node-RED will load this flow when the container is started.



          Otherwise you can just connect to the web editor as normal to edit the existing flow.






          share|improve this answer






















          • Thanks for the reply @hardillb! You mean opening a shell in the container and replacing package.json by my previous flow.json? How is that done in the command shell?
            – Arduino
            Nov 12 at 19:01






          • 2




            No, I mean either mounting flow.json as a volume or rebuilding the Docker container from the Dockerfile and adding the file to the image
            – hardillb
            Nov 12 at 19:04










          • The second part of your reply is another issue I'm facing; when running nodeRed through docker I'm unable to connect to the web editor normally as when running it through my cmd. I guess it has to do with the IP I'm browsing, but none have worked (127.0.0.1:1800 nor my local/public IP). Any ideas why?
            – Arduino
            Nov 12 at 21:13










          • You said you had deployed the docker container in Azure, so why would you try and connect to your local machine?
            – hardillb
            Nov 13 at 7:02













          0












          0








          0






          When you edit the Dockerfile to add your own package.json to add the extra nodes you can also add a flow.json file to /data and Node-RED will load this flow when the container is started.



          Otherwise you can just connect to the web editor as normal to edit the existing flow.






          share|improve this answer














          When you edit the Dockerfile to add your own package.json to add the extra nodes you can also add a flow.json file to /data and Node-RED will load this flow when the container is started.



          Otherwise you can just connect to the web editor as normal to edit the existing flow.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 12 at 20:38

























          answered Nov 12 at 18:00









          hardillb

          23.7k63060




          23.7k63060











          • Thanks for the reply @hardillb! You mean opening a shell in the container and replacing package.json by my previous flow.json? How is that done in the command shell?
            – Arduino
            Nov 12 at 19:01






          • 2




            No, I mean either mounting flow.json as a volume or rebuilding the Docker container from the Dockerfile and adding the file to the image
            – hardillb
            Nov 12 at 19:04










          • The second part of your reply is another issue I'm facing; when running nodeRed through docker I'm unable to connect to the web editor normally as when running it through my cmd. I guess it has to do with the IP I'm browsing, but none have worked (127.0.0.1:1800 nor my local/public IP). Any ideas why?
            – Arduino
            Nov 12 at 21:13










          • You said you had deployed the docker container in Azure, so why would you try and connect to your local machine?
            – hardillb
            Nov 13 at 7:02
















          • Thanks for the reply @hardillb! You mean opening a shell in the container and replacing package.json by my previous flow.json? How is that done in the command shell?
            – Arduino
            Nov 12 at 19:01






          • 2




            No, I mean either mounting flow.json as a volume or rebuilding the Docker container from the Dockerfile and adding the file to the image
            – hardillb
            Nov 12 at 19:04










          • The second part of your reply is another issue I'm facing; when running nodeRed through docker I'm unable to connect to the web editor normally as when running it through my cmd. I guess it has to do with the IP I'm browsing, but none have worked (127.0.0.1:1800 nor my local/public IP). Any ideas why?
            – Arduino
            Nov 12 at 21:13










          • You said you had deployed the docker container in Azure, so why would you try and connect to your local machine?
            – hardillb
            Nov 13 at 7:02















          Thanks for the reply @hardillb! You mean opening a shell in the container and replacing package.json by my previous flow.json? How is that done in the command shell?
          – Arduino
          Nov 12 at 19:01




          Thanks for the reply @hardillb! You mean opening a shell in the container and replacing package.json by my previous flow.json? How is that done in the command shell?
          – Arduino
          Nov 12 at 19:01




          2




          2




          No, I mean either mounting flow.json as a volume or rebuilding the Docker container from the Dockerfile and adding the file to the image
          – hardillb
          Nov 12 at 19:04




          No, I mean either mounting flow.json as a volume or rebuilding the Docker container from the Dockerfile and adding the file to the image
          – hardillb
          Nov 12 at 19:04












          The second part of your reply is another issue I'm facing; when running nodeRed through docker I'm unable to connect to the web editor normally as when running it through my cmd. I guess it has to do with the IP I'm browsing, but none have worked (127.0.0.1:1800 nor my local/public IP). Any ideas why?
          – Arduino
          Nov 12 at 21:13




          The second part of your reply is another issue I'm facing; when running nodeRed through docker I'm unable to connect to the web editor normally as when running it through my cmd. I guess it has to do with the IP I'm browsing, but none have worked (127.0.0.1:1800 nor my local/public IP). Any ideas why?
          – Arduino
          Nov 12 at 21:13












          You said you had deployed the docker container in Azure, so why would you try and connect to your local machine?
          – hardillb
          Nov 13 at 7:02




          You said you had deployed the docker container in Azure, so why would you try and connect to your local machine?
          – hardillb
          Nov 13 at 7:02

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53265088%2fpush-a-node-red-flow-to-a-docker-container%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Barbados

          How to read a connectionString WITH PROVIDER in .NET Core?

          Node.js Script on GitHub Pages or Amazon S3