From 559afb488bb8960adb60755d9f4aea5e1026d0a5 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Sun, 5 Jul 2020 19:18:01 +0200 Subject: [PATCH] :whale: Add Raspberry Pi Docker image --- .github/workflows/docker-images.yml | 5 +++++ docker/images/n8n-rpi/Dockerfile | 20 ++++++++++++++++++++ docker/images/n8n-rpi/README.md | 21 +++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 docker/images/n8n-rpi/Dockerfile create mode 100644 docker/images/n8n-rpi/README.md diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml index 8d034b5b91..b05b6aa714 100644 --- a/.github/workflows/docker-images.yml +++ b/.github/workflows/docker-images.yml @@ -32,3 +32,8 @@ jobs: run: docker build --build-arg N8N_VERSION=${{steps.vars.outputs.tag}} -t n8nio/n8n:${{steps.vars.outputs.tag}}-ubuntu docker/images/n8n-ubuntu - name: Push Docker image of version (Ubuntu) run: docker push n8nio/n8n:${{steps.vars.outputs.tag}}-ubuntu + + - name: Build the Docker image of version (Rpi) + run: docker build --build-arg N8N_VERSION=${{steps.vars.outputs.tag}} -t n8nio/n8n:${{steps.vars.outputs.tag}}-rpi docker/images/n8n-rpi + - name: Push Docker image of version (Rpi) + run: docker push n8nio/n8n:${{steps.vars.outputs.tag}}-rpi diff --git a/docker/images/n8n-rpi/Dockerfile b/docker/images/n8n-rpi/Dockerfile new file mode 100644 index 0000000000..b60d50bdeb --- /dev/null +++ b/docker/images/n8n-rpi/Dockerfile @@ -0,0 +1,20 @@ +FROM arm32v7/node:12.16 + +ARG N8N_VERSION + +RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi + +RUN \ + apt-get update && \ + apt-get -y install graphicsmagick gosu + +RUN npm_config_user=root npm install -g full-icu n8n@${N8N_VERSION} + +ENV NODE_ICU_DATA /usr/local/lib/node_modules/full-icu +ENV NODE_ENV production + +WORKDIR /data + +USER node + +CMD n8n diff --git a/docker/images/n8n-rpi/README.md b/docker/images/n8n-rpi/README.md new file mode 100644 index 0000000000..9eca14e3f6 --- /dev/null +++ b/docker/images/n8n-rpi/README.md @@ -0,0 +1,21 @@ +## n8n - Raspberry PI Docker Image + +Dockerfile to build n8n for Raspberry PI. + +For information about how to run n8n with Docker check the generic +[Docker-Readme](https://github.com/n8n-io/n8n/tree/master/docker/images/n8n/README.md) + + +``` +docker build --build-arg N8N_VERSION= -t n8nio/n8n: . + +# For example: +docker build --build-arg N8N_VERSION=0.43.0 -t n8nio/n8n:0.43.0-rpi . +``` + +``` +docker run -it --rm \ + --name n8n \ + -p 5678:5678 \ + n8nio/n8n:0.70.0-rpi +```