diff --git a/Dockerfile b/Dockerfile
index c1cf0d0..cf9ab67 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,19 +1,29 @@
-FROM node:16-alpine
+# ---- Base ----
+FROM alpine:3 AS base
# Create app directory
WORKDIR /usr/src/app
+# Copy project file
+COPY package.json .
+
+# Install required apk-packages
+RUN apk add --no-cache nodejs npm tcpdump
+
+
+# ---- Dependencies ----
+FROM base AS dependencies
+
# Install app dependencies
-COPY package*.json ./
-RUN npm install
+RUN npm install --only=production
-# remove development dependencies
-RUN npm prune --production
-# Install required apk-packages & delete cache
-RUN apk update && apk add tcpdump && rm -rf /var/cache/apk/*
+# ---- Release ----
+FROM base AS release
+# copy from build image
+COPY --from=dependencies /usr/src/app/ ./
# Bundle app source
COPY ./src/ .
-CMD ["npm", "run", "start"]
\ No newline at end of file
+CMD ["npm", "run", "start"]
diff --git a/README.md b/README.md
index 33acff7..39b432e 100644
--- a/README.md
+++ b/README.md
@@ -14,25 +14,26 @@ Table of contents
=================
- [1. Description](#1-description)
- - [1.1. What kind of data](#11-what-kind-of-data)
- - [1.2. Data-Usage](#12-data-usage)
- - [1.3. Tools used](#13-tools-used)
+ - [1.1. What kind of data](#11-what-kind-of-data)
+ - [1.2. Data-Usage](#12-data-usage)
+ - [1.3. Tools used](#13-tools-used)
+ - [1.4. Architecture](#14-architecture)
- [2. Usage/Installation](#2-usageinstallation)
- - [2.1. Prerequisites](#21-prerequisites)
- - [2.2. Choosing an Export-Method](#22-choosing-an-export-method)
- - [2.3. Running with Docker](#23-running-with-docker)
- - [2.4. Environment-Variables](#24-environment-variables)
+ - [2.1. Prerequisites](#21-prerequisites)
+ - [2.2. Choosing an Export-Method](#22-choosing-an-export-method)
+ - [2.3. Running with Docker](#23-running-with-docker)
+ - [2.4. Environment-Variables](#24-environment-variables)
- [3. Data collected](#3-data-collected)
- - [3.1. Data-Types](#31-data-types)
- - [3.2. Metric-Overview](#32-metric-overview)
- - [3.3. Metric-Details](#33-metric-details)
- - [3.4. Tag-Overview](#34-tag-overview)
- - [3.5. Tag-Details](#35-tag-details)
+ - [3.1. Data-Types](#31-data-types)
+ - [3.2. Metric-Overview](#32-metric-overview)
+ - [3.3. Metric-Details](#33-metric-details)
+ - [3.4. Tag-Overview](#34-tag-overview)
+ - [3.5. Tag-Details](#35-tag-details)
- [4. Potential Issues](#4-potential-issues)
- - [4.1. Channel/Frequency](#41-channelfrequency)
- - [4.2. Technology](#42-technology)
- - [4.3. Data protection](#43-data-protection)
- - [4.4. Ethical](#44-ethical)
+ - [4.1. Channel/Frequency](#41-channelfrequency)
+ - [4.2. Technology](#42-technology)
+ - [4.3. Data protection](#43-data-protection)
+ - [4.4. Ethical](#44-ethical)
@@ -81,6 +82,14 @@ e.g.
The program uses `tcpdump` for listening in a subProcess and then extract the metadata when packets arrive.
+
+
+## 1.4. Architecture
+
+![](docs/img/1.4.architecture.png)
+
+The system heavily uses NodeJS-Streams to read, transform and pass data around.
+
# 2. Usage/Installation
@@ -256,7 +265,7 @@ Variable|Description
Variable|Default|Description
---|---|---
`LOGLEVEL` | INFO | Loglevel
-`WIFI_INTERFACE` | wlan0 | Token with write-access
+`WIFI_INTERFACE` | wlan0 | Wifi-Interface name in Monitor-Mode
~~`HOSTNAME`~~ | ~~Device's Hostname~~ | ~~Hostname to use as global hostname-tag~~ *(Unused)*
diff --git a/build/docker-multiarch.sh b/build/docker-multiarch.sh
new file mode 100755
index 0000000..2bbc1be
--- /dev/null
+++ b/build/docker-multiarch.sh
@@ -0,0 +1,9 @@
+TAG="ruakij/rfmon-to-influx"
+PLATFORM="linux/amd64,linux/arm64/v8,linux/arm/v7"
+EXTRA_ARGS="$@"
+
+docker buildx build \
+--platform $PLATFORM \
+--tag $TAG \
+$EXTRA_ARGS \
+.
diff --git a/build/docker-ownarch.sh b/build/docker-ownarch.sh
new file mode 100755
index 0000000..c0807a8
--- /dev/null
+++ b/build/docker-ownarch.sh
@@ -0,0 +1,7 @@
+TAG="ruakij/rfmon-to-influx"
+EXTRA_ARGS="$@"
+
+docker build \
+--tag $TAG \
+$EXTRA_ARGS \
+.
diff --git a/docs/img/1.4.architecture.png b/docs/img/1.4.architecture.png
new file mode 100644
index 0000000..0170ec9
Binary files /dev/null and b/docs/img/1.4.architecture.png differ