diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..43b4f9e --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,29 @@ +FROM hypriot/rpi-node:latest + +# https://docs.flowhub.io/getting-started-node/ + +# Prepare a Node.js project +RUN mkdir noflo-example && \ + cd noflo-example && \ + npm init --yes + +# Install NoFlo itself +RUN npm install noflo --save + +# Install a few components (there are many more) +RUN npm install noflo-filesystem --save && \ + npm install noflo-core --save && \ + npm install noflo-amqp --save && \ + npm install noflo-packets --save && \ + npm install noflo-mqtt --save + +# Install the runtime +RUN npm install noflo-nodejs --save + +COPY init-and-run.sh . +RUN chmod ug+x init-and-run.sh + +CMD ./init-and-run.sh + + +EXPOSE 3569 diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..1566532 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,80 @@ +# docker-noflo-runtime-js +This is the source to build a docker container for [noflo-nodejs](https://github.com/noflo/noflo-nodejs). +There shall be an additional version for X86 in addition to the current ARM (Raspberry Pi) version. + +## Very short: How do I use it? +Install docker engine on a Raspberry Pi and then run + + docker run -d -e "SEJNUB_FLOWHUB_USERID=" -e "SEJNUB_NOFLO_RUNTIME_HOST=" -e "SEJNUB_NOFLO_RUNTIME_SECRET=" -e "SEJNUB_NOFLO_RUNTIME_LABEL=