From 78e82d39d08a8e2edc25178c4dce7e82c884e69c Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Fri, 5 Jan 2018 19:06:18 +0000 Subject: [PATCH 1/3] Initial commit --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fa1e1b3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Paulo Costa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 9d91343571c8112e98bfd49c7d78d97d93c04c25 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Fri, 5 Jan 2018 19:17:43 +0000 Subject: [PATCH 2/3] create README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..97ac422 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# Node-RED RPI Docker with GPIO access +Node-RED docker container tailored for raspberry pi with GPIO support. + +## About +Installs Node-RED for raspberry pi with GPIO support in a docker container. +Is based on rpi version of [node-red/node-red-docker](https://github.com/node-red/node-red-docker) project and adds support for GPIO access and additional packages. + + +## Installation + +Node-RED is installed for user node-red which is created in the docker initialization + +docker build -t coostax/nodered-gpio-rpi-docker:latest . + + +## Running + +docker run --device /dev/ttyAMA0:/dev/ttyAMA0 --device /dev/mem:/dev/mem -p 1880:1880 --privileged -ti coostax/nodered-gpio-rpi-docker From bfb969750366ab74f33a583e10e1f245410e7216 Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Fri, 5 Jan 2018 23:10:22 +0000 Subject: [PATCH 3/3] update README added new build instructions added info on Makefile --- README.md | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 97ac422..1326f4f 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,42 @@ Installs Node-RED for raspberry pi with GPIO support in a docker container. Is based on rpi version of [node-red/node-red-docker](https://github.com/node-red/node-red-docker) project and adds support for GPIO access and additional packages. -## Installation +The following packages are included in Node-RED +- node-red-contrib-gpio +- node-red-contrib-tradfri +- node-red-dashboard +- node-red-contrib-google-home-notify +- node-red-contrib-ifttt -Node-RED is installed for user node-red which is created in the docker initialization +## Install -docker build -t coostax/nodered-gpio-rpi-docker:latest . +This project has an automated build on [DockerHub](https://hub.docker.com/r/coostax/nodered-rpi-gpio/). You can pull the image with `docker pull coostax/nodered-rpi-gpio` +You can also clone this project and build the image locally + +```bash + docker build -t coostax/nodered-rpi-gpio . +``` + ## Running -docker run --device /dev/ttyAMA0:/dev/ttyAMA0 --device /dev/mem:/dev/mem -p 1880:1880 --privileged -ti coostax/nodered-gpio-rpi-docker +After building the image you can start a container runnning + +```bash +docker run -i -t --privileged --device /dev/ttyAMA0:/dev/ttyAMA0 --device /dev/mem:/dev/mem -p 1880:1880 --name=nodered-rpi-gpio coostax/nodered-rpi-gpio +``` + +### Using the Makefile + +It is also possible start a container and build the image in a single step using the provided Makefile +```bash + make up +``` + +To stop and remove the container +```bash + make stop +``` + +To see more options for the Makefile run `make`