Merge pull request #532 from buanet/beta

Merge into main
This commit is contained in:
André Germann
2025-05-21 22:04:15 +02:00
committed by GitHub
9 changed files with 178 additions and 156 deletions

View File

@@ -1 +1 @@
v10.0.0 v10.0.1-beta.1

View File

@@ -24,7 +24,7 @@ jobs:
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.2
with: with:
repository: 'buanet/ioBroker.docker' repository: 'buanet/ioBroker.docker'
ref: ${{ env.RELEASE_TAG }} ref: ${{ env.RELEASE_TAG }}
@@ -50,27 +50,27 @@ jobs:
mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0 uses: docker/setup-qemu-action@v3.6.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v3.6.1 uses: docker/setup-buildx-action@v3.10.0
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
username: ${{ secrets.DOCKER_USER }} username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }} password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }} username: ${{ secrets.PACKAGES_USER }}
password: ${{ secrets.PACKAGES_PASS }} password: ${{ secrets.PACKAGES_PASS }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v6.6.1 uses: docker/build-push-action@v6.17.0
with: with:
context: ./debian12 context: ./debian12
file: ./debian12/Dockerfile file: ./debian12/Dockerfile
@@ -96,7 +96,7 @@ jobs:
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.2
with: with:
repository: 'buanet/ioBroker.docker' repository: 'buanet/ioBroker.docker'
ref: ${{ env.RELEASE_TAG }} ref: ${{ env.RELEASE_TAG }}
@@ -122,27 +122,27 @@ jobs:
mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0 uses: docker/setup-qemu-action@v3.6.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v3.6.1 uses: docker/setup-buildx-action@v3.10.0
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
username: ${{ secrets.DOCKER_USER }} username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }} password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }} username: ${{ secrets.PACKAGES_USER }}
password: ${{ secrets.PACKAGES_PASS }} password: ${{ secrets.PACKAGES_PASS }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v6.6.1 uses: docker/build-push-action@v6.17.0
with: with:
context: ./debian12 context: ./debian12
file: ./debian12/Dockerfile file: ./debian12/Dockerfile

View File

@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.2
with: with:
repository: 'buanet/ioBroker.docker' repository: 'buanet/ioBroker.docker'
@@ -44,27 +44,27 @@ jobs:
mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0 uses: docker/setup-qemu-action@v3.6.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v3.6.1 uses: docker/setup-buildx-action@v3.10.0
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
username: ${{ secrets.DOCKER_USER }} username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }} password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }} username: ${{ secrets.PACKAGES_USER }}
password: ${{ secrets.PACKAGES_PASS }} password: ${{ secrets.PACKAGES_PASS }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v6.6.1 uses: docker/build-push-action@v6.17.0
with: with:
context: ./debian12 context: ./debian12
file: ./debian12/Dockerfile file: ./debian12/Dockerfile
@@ -85,7 +85,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.2
with: with:
repository: 'buanet/ioBroker.docker' repository: 'buanet/ioBroker.docker'
@@ -110,27 +110,27 @@ jobs:
mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0 uses: docker/setup-qemu-action@v3.6.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v3.6.1 uses: docker/setup-buildx-action@v3.10.0
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
username: ${{ secrets.DOCKER_USER }} username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }} password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }} username: ${{ secrets.PACKAGES_USER }}
password: ${{ secrets.PACKAGES_PASS }} password: ${{ secrets.PACKAGES_PASS }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v6.6.1 uses: docker/build-push-action@v6.17.0
with: with:
context: ./debian12 context: ./debian12
file: ./debian12/Dockerfile file: ./debian12/Dockerfile

View File

@@ -18,7 +18,7 @@ jobs:
echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.2
with: with:
repository: 'buanet/ioBroker.docker' repository: 'buanet/ioBroker.docker'
ref: ${{ env.RELEASE_TAG }} ref: ${{ env.RELEASE_TAG }}
@@ -44,27 +44,27 @@ jobs:
mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0 uses: docker/setup-qemu-action@v3.6.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v3.6.1 uses: docker/setup-buildx-action@v3.10.0
- name: Login to DockerHub (buanet) - name: Login to DockerHub (buanet)
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
username: ${{ secrets.DOCKER_USER }} username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }} password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }} username: ${{ secrets.PACKAGES_USER }}
password: ${{ secrets.PACKAGES_PASS }} password: ${{ secrets.PACKAGES_PASS }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v6.6.1 uses: docker/build-push-action@v6.17.0
with: with:
context: ./debian12 context: ./debian12
file: ./debian12/Dockerfile file: ./debian12/Dockerfile
@@ -94,7 +94,7 @@ jobs:
echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.2
with: with:
repository: 'buanet/ioBroker.docker' repository: 'buanet/ioBroker.docker'
ref: ${{ env.RELEASE_TAG }} ref: ${{ env.RELEASE_TAG }}
@@ -120,20 +120,20 @@ jobs:
mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile mv -f ./debian12/Dockerfile.tmp ./debian12/Dockerfile
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0 uses: docker/setup-qemu-action@v3.6.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v3.6.1 uses: docker/setup-buildx-action@v3.10.0
- name: Login to DockerHub (buanet) - name: Login to DockerHub (buanet)
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
username: ${{ secrets.DOCKER_USER_IOB }} username: ${{ secrets.DOCKER_USER_IOB }}
password: ${{ secrets.DOCKER_PASS_IOB }} password: ${{ secrets.DOCKER_PASS_IOB }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v6.6.1 uses: docker/build-push-action@v6.17.0
with: with:
context: ./debian12 context: ./debian12
file: ./debian12/Dockerfile file: ./debian12/Dockerfile

View File

@@ -12,10 +12,10 @@ jobs:
update-docker-readme: update-docker-readme:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.2
- name: Update Docker Hub Readme (buanet) - name: Update Docker Hub Readme (buanet)
uses: peter-evans/dockerhub-description@v4.0.0 uses: peter-evans/dockerhub-description@v4.0.2
with: with:
username: ${{ secrets.DOCKER_USER }} username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }} password: ${{ secrets.DOCKER_PASS }}
@@ -24,7 +24,7 @@ jobs:
readme-filepath: ./docs/README_docker_hub_buanet.md readme-filepath: ./docs/README_docker_hub_buanet.md
- name: Update Docker Hub Readme (iobroker) - name: Update Docker Hub Readme (iobroker)
uses: peter-evans/dockerhub-description@v4.0.0 uses: peter-evans/dockerhub-description@v4.0.2
with: with:
username: ${{ secrets.DOCKER_USER_IOB }} username: ${{ secrets.DOCKER_USER_IOB }}
password: ${{ secrets.DOCKER_PASS_IOB }} password: ${{ secrets.DOCKER_PASS_IOB }}

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.2
with: with:
repository: 'buanet/ioBroker.docker' repository: 'buanet/ioBroker.docker'
token: ${{ secrets.ACTIONS_PAT }} token: ${{ secrets.ACTIONS_PAT }}

View File

@@ -1,4 +1,6 @@
FROM debian:bookworm-slim FROM debian:bookworm-slim
# FROM node:20.12-bookworm-slim
LABEL org.opencontainers.image.title="Official ioBroker Docker Image" \ LABEL org.opencontainers.image.title="Official ioBroker Docker Image" \
org.opencontainers.image.description="Official Docker image for ioBroker smarthome software (https://www.iobroker.net)" \ org.opencontainers.image.description="Official Docker image for ioBroker smarthome software (https://www.iobroker.net)" \

View File

@@ -42,9 +42,6 @@ It is highly recommended not to use the `latest` tag for production, especially
* [`v9.1.1`](https://github.com/buanet/ioBroker.docker/blob/v9.1.1/debian12/Dockerfile) * [`v9.1.1`](https://github.com/buanet/ioBroker.docker/blob/v9.1.1/debian12/Dockerfile)
* [`v9.1.0`](https://github.com/buanet/ioBroker.docker/blob/v9.1.0/debian12/Dockerfile) * [`v9.1.0`](https://github.com/buanet/ioBroker.docker/blob/v9.1.0/debian12/Dockerfile)
* [`v9.0.1`](https://github.com/buanet/ioBroker.docker/blob/v9.0.1/debian12/Dockerfile) * [`v9.0.1`](https://github.com/buanet/ioBroker.docker/blob/v9.0.1/debian12/Dockerfile)
* [`v8.1.0`](https://github.com/buanet/ioBroker.docker/blob/v8.1.0/debian/node18/Dockerfile), [`latest-v8`](https://github.com/buanet/ioBroker.docker/blob/v8.1.0/debian/node18/Dockerfile),
* [`v8.0.1`](https://github.com/buanet/ioBroker.docker/blob/v8.0.1/debian/node18/Dockerfile)
* [`v8.0.0`](https://github.com/buanet/ioBroker.docker/blob/v8.0.0/debian/node18/Dockerfile)
# What is ioBroker? # What is ioBroker?
@@ -54,21 +51,22 @@ For further details please check out [iobroker.net](https://www.iobroker.net).
# How to use this image? # How to use this image?
## Running from command-line ## Quick Start (for testing)
For taking a first look at iobroker on docker it would be enough to simply run the following basic docker run command: To quickly try out ioBroker in Docker, simply run:
``` ```
docker run -p 8081:8081 --name iobroker -h iobroker buanet/iobroker docker run -p 8081:8081 --name iobroker -h iobroker buanet/iobroker
``` ```
## Running with docker-compose **Note:**
All data and settings will be lost when the container is removed or recreated. For production use, always use persistent storage (see below).
When using docker-compose define the iobroker service like this: ## Production Setup with Docker Compose
``` For a persistent and production-ready setup, use Docker Compose and mount a volume for your data:
version: '2'
```yaml
services: services:
iobroker: iobroker:
container_name: iobroker container_name: iobroker
@@ -77,70 +75,82 @@ services:
restart: always restart: always
ports: ports:
- "8081:8081" - "8081:8081"
volumes:
- iobrokerdata:/opt/iobroker
environment:
- TZ=Europe/Berlin
volumes:
iobrokerdata:
``` ```
## Persistent data **Tip:**
Depending on your adapters, you may need to expose additional ports or use a different network mode (e.g. `network_mode: host`).
See the [Networking section](#notes-about-docker-networks) for more details.
To make your ioBroker configuration persistent it is recommended to mount a volume or path to `/opt/iobroker`. ## Persistent Data
On command-line add To keep your ioBroker configuration and data, always mount a volume or path to `/opt/iobroker`:
- **Command-line:**
``` ```
-v iobrokerdata:/opt/iobroker -v iobrokerdata:/opt/iobroker
``` ```
On docker-compose add - **Docker Compose:**
``` ```
volumes: volumes:
- iobrokerdata:/opt/iobroker - iobrokerdata:/opt/iobroker
``` ```
## Configuration via environment variables ## Configuration via Environment Variables
You could use environment variables to auto configure your ioBroker container on startup. You can use environment variables to automatically configure your ioBroker container at startup.
### Configure ioBroker application: ### Application Configuration
* `IOB_ADMINPORT` (optional, default: 8081) Set ioBroker adminport on startup - `IOB_ADMINPORT` (optional, default: 8081) Set ioBroker admin port on startup
* `IOB_BACKITUP_EXTDB` (optional) Set `true` for backing up external databases in ioBroker backitup adapter (Make sure your have read the [docs](https://docs.buanet.de/iobroker-docker-image/docs/#backup)) - `IOB_BACKITUP_EXTDB` (optional) Set `true` to enable external database backup in the Backitup adapter ([see docs](https://docs.buanet.de/iobroker-docker-image/docs/#backup))
* `IOB_MULTIHOST` (optional) Set "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!) - `IOB_MULTIHOST` (optional) Set to "master" or "slave" for multihost support (requires additional config for objectsdb and statesdb)
* `IOB_OBJECTSDB_TYPE` (optional, default: jsonl) Set type of ioBroker objects db, could be "jsonl", "file" (deprecated) or "redis" - `IOB_OBJECTSDB_TYPE` (optional, default: jsonl) Type of objects DB: "jsonl", "file" (deprecated), or "redis"
* `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Set host for ioBroker objects db, supports comma separated list for Redis Sentinel Cluster - `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Host for objects DB (comma-separated for Redis Sentinel)
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Set port for ioBroker objects db, supports comma separated list for Redis Sentinel Cluster - `IOB_OBJECTSDB_PORT` (optional, default: 9001) Port for objects DB (comma-separated for Redis Sentinel)
* `IOB_OBJECTSDB_PASS` (optional) Set authentication for Redis db connection - `IOB_OBJECTSDB_PASS` (optional) Password for Redis DB
* `IOB_OBJECTSDB_NAME` (optional, default: mymaster) Set name for Redis Sentinel CLuster db - `IOB_OBJECTSDB_NAME` (optional, default: mymaster) Redis Sentinel DB name
* `IOB_STATESDB_TYPE` (optional, default: jsonl) Set type of ioBroker states db, could be "jsonl", "file" (deprecated) or "redis" - `IOB_STATESDB_TYPE` (optional, default: jsonl) Type of states DB: "jsonl", "file" (deprecated), or "redis"
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Set host for ioBroker states db, supports comma separated list for Redis Sentinel Cluster - `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Host for states DB (comma-separated for Redis Sentinel)
* `IOB_STATESDB_PORT` (optional, default: 9000) Set port for ioBroker states db, supports comma separated list for Redis Sentinel Cluster - `IOB_STATESDB_PORT` (optional, default: 9000) Port for states DB (comma-separated for Redis Sentinel)
* `IOB_STATESDB_PASS` (optional) Set authentication for Redis db connection - `IOB_STATESDB_PASS` (optional) Password for Redis DB
* `IOB_STATESDB_NAME` (optional, default: mymaster) Set name for Redis Sentinel cluster db - `IOB_STATESDB_NAME` (optional, default: mymaster) Redis Sentinel DB name
### Activate special features: ### Special Features
* `AVAHI` (optional) Set `true` to install and activate avahi-daemon for supporting yahka adapter - `AVAHI` (optional) Set `true` to install and activate avahi-daemon (for yahka adapter support)
### Configure environment: ### Environment Configuration
* `DEBUG` (optional) Set `true` to get extended logging messages on container startup - `DEBUG` (optional) Set `true` for extended logging on container startup
* `LANG` (optional, default: de_DE.UTF-8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8 - `LANG` (optional, default: de_DE.UTF-8) Pre-generated: de_DE.UTF-8, en_US.UTF-8
* `LANGUAGE` (optional, default: de_DE:de) The following locales are pre-generated: de_DE:de, en_US:en - `LANGUAGE` (optional, default: de_DE:de) Pre-generated: de_DE:de, en_US:en
* `LC_ALL` (optional, default: de_DE.UTF-8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8 - `LC_ALL` (optional, default: de_DE.UTF-8) Pre-generated: de_DE.UTF-8, en_US.UTF-8
* `OFFLINE_MODE` (optional) Set `true` if your container has no or limited internet connection - `OFFLINE_MODE` (optional) Set `true` if your container has no or limited internet connection
* `PACKAGES` (optional) Install additional Linux packages to your container, packages should be separated by whitespace like this: `package1 package2 package3`. - `PACKAGES` (optional) Install additional Linux packages (space-separated list)
* `PACKAGES_UPDATE` (optional) Set `true` if you want to apply Linux package updates at the first start of a new container. - `PACKAGES_UPDATE` (optional) Set `true` to update Linux packages on first start
* `PERMISSION_CHECK` (optional, default: true) Set "false" to skip checking and correcting all relevant permissions on container startup (Use at own risk!!!) - `PERMISSION_CHECK` (optional, default: true) Set "false" to skip permission checks/corrections (use at your own risk)
* `SETGID` (default: 1000) In some cases it might be useful to specify the gid of the containers iobroker user to match an existing group on the docker host - `SETGID` (default: 1000) Set the GID for the iobroker user (to match a group on the host)
* `SETUID` (default: 1000) In some cases it might be useful to specify the uid of the containers iobroker user to match an existing user on the docker host - `SETUID` (default: 1000) Set the UID for the iobroker user (to match a user on the host)
* `TZ` (optional, default: Europe/Berlin) Specifies the time zone, could be all valid Linux timezones - `TZ` (optional, default: Europe/Berlin) Set the timezone (any valid Linux timezone)
* `USBDEVICES` (optional) Set relevant permissions on mounted devices like `/dev/ttyACM0` (inside the container), for more than one device separate with ";" - `USBDEVICES` (optional) Set permissions for mounted devices (e.g. `/dev/ttyACM0`, separate multiple devices with ";")
## Notes about Docker networks ## Notes about Docker Networks
The examples above are dealing with the Docker default bridge network. In general there are [some reasons](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge) why it might be the better choice to use a user-defined bridge network. The above examples use Docker's default bridge network. In many cases, it is better to use a user-defined bridge network.
See [Docker docs: bridge differences](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge).
Using a Docker bridge network works fine for taking a first look and with most of the ioBroker adapters (if you don't forget to redirect the ports your adapters use).<br> A bridge network works for most adapters if you map all required ports.
But some ioBroker adapters are using techniques like [Multicast](https://en.wikipedia.org/wiki/Multicast) or [Broadcast](https://en.wikipedia.org/wiki/Broadcasting_(networking)) for automatic detection of IoT devices<br> However, some adapters require [Multicast](https://en.wikipedia.org/wiki/Multicast) or [Broadcast](https://en.wikipedia.org/wiki/Broadcasting_(networking)) for device discovery.
In this case it may be useful to switch to [host](https://docs.docker.com/network/host/) or [MACVLAN](https://docs.docker.com/network/macvlan/) network. In these cases, consider using [host](https://docs.docker.com/network/host/) or [MACVLAN](https://docs.docker.com/network/macvlan/) networking.
For more information about networking with Docker please refer to the [official Docker docs](https://docs.docker.com/network/). For more information, see the [official Docker networking documentation](https://docs.docker.com/network/).
# Support the Project # Support the Project

View File

@@ -44,9 +44,6 @@ It is highly recommended not to use the `latest` tag for production, especially
* [`v9.1.1`](https://github.com/buanet/ioBroker.docker/blob/v9.1.1/debian12/Dockerfile) * [`v9.1.1`](https://github.com/buanet/ioBroker.docker/blob/v9.1.1/debian12/Dockerfile)
* [`v9.1.0`](https://github.com/buanet/ioBroker.docker/blob/v9.1.0/debian12/Dockerfile) * [`v9.1.0`](https://github.com/buanet/ioBroker.docker/blob/v9.1.0/debian12/Dockerfile)
* [`v9.0.1`](https://github.com/buanet/ioBroker.docker/blob/v9.0.1/debian12/Dockerfile) * [`v9.0.1`](https://github.com/buanet/ioBroker.docker/blob/v9.0.1/debian12/Dockerfile)
* [`v8.1.0`](https://github.com/buanet/ioBroker.docker/blob/v8.1.0/debian/node18/Dockerfile), [`latest-v8`](https://github.com/buanet/ioBroker.docker/blob/v8.1.0/debian/node18/Dockerfile),
* [`v8.0.1`](https://github.com/buanet/ioBroker.docker/blob/v8.0.1/debian/node18/Dockerfile)
* [`v8.0.0`](https://github.com/buanet/ioBroker.docker/blob/v8.0.0/debian/node18/Dockerfile)
# What is ioBroker? # What is ioBroker?
@@ -56,21 +53,22 @@ For further details please check out [iobroker.net](https://www.iobroker.net).
# How to use this image? # How to use this image?
## Running from command-line ## Quick Start (for testing)
For taking a first look at iobroker on docker it would be enough to simply run the following basic docker run command: To quickly try out ioBroker in Docker, simply run:
``` ```
docker run -p 8081:8081 --name iobroker -h iobroker buanet/iobroker docker run -p 8081:8081 --name iobroker -h iobroker buanet/iobroker
``` ```
## Running with docker-compose **Note:**
All data and settings will be lost when the container is removed or recreated. For production use, always use persistent storage (see below).
When using docker-compose define the iobroker service like this: ## Production Setup with Docker Compose
``` For a persistent and production-ready setup, use Docker Compose and mount a volume for your data:
version: '2'
```yaml
services: services:
iobroker: iobroker:
container_name: iobroker container_name: iobroker
@@ -79,70 +77,82 @@ services:
restart: always restart: always
ports: ports:
- "8081:8081" - "8081:8081"
volumes:
- iobrokerdata:/opt/iobroker
environment:
- TZ=Europe/Berlin
volumes:
iobrokerdata:
``` ```
## Persistent data **Tip:**
Depending on your adapters, you may need to expose additional ports or use a different network mode (e.g. `network_mode: host`).
See the [Networking section](#notes-about-docker-networks) for more details.
To make your ioBroker configuration persistent it is recommended to mount a volume or path to `/opt/iobroker`. ## Persistent Data
On command-line add To keep your ioBroker configuration and data, always mount a volume or path to `/opt/iobroker`:
- **Command-line:**
``` ```
-v iobrokerdata:/opt/iobroker -v iobrokerdata:/opt/iobroker
``` ```
On docker-compose add - **Docker Compose:**
``` ```
volumes: volumes:
- iobrokerdata:/opt/iobroker - iobrokerdata:/opt/iobroker
``` ```
## Configuration via environment variables ## Configuration via Environment Variables
You could use environment variables to auto configure your ioBroker container on startup. You can use environment variables to automatically configure your ioBroker container at startup.
### Configure ioBroker application: ### Application Configuration
* `IOB_ADMINPORT` (optional, default: 8081) Set ioBroker adminport on startup - `IOB_ADMINPORT` (optional, default: 8081) Set ioBroker admin port on startup
* `IOB_BACKITUP_EXTDB` (optional) Set `true` for backing up external databases in ioBroker backitup adapter (Make sure your have read the [docs](https://docs.buanet.de/iobroker-docker-image/docs/#backup)) - `IOB_BACKITUP_EXTDB` (optional) Set `true` to enable external database backup in the Backitup adapter ([see docs](https://docs.buanet.de/iobroker-docker-image/docs/#backup))
* `IOB_MULTIHOST` (optional) Set "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!) - `IOB_MULTIHOST` (optional) Set to "master" or "slave" for multihost support (requires additional config for objectsdb and statesdb)
* `IOB_OBJECTSDB_TYPE` (optional, default: jsonl) Set type of ioBroker objects db, could be "jsonl", "file" (deprecated) or "redis" - `IOB_OBJECTSDB_TYPE` (optional, default: jsonl) Type of objects DB: "jsonl", "file" (deprecated), or "redis"
* `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Set host for ioBroker objects db, supports comma separated list for Redis Sentinel Cluster - `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Host for objects DB (comma-separated for Redis Sentinel)
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Set port for ioBroker objects db, supports comma separated list for Redis Sentinel Cluster - `IOB_OBJECTSDB_PORT` (optional, default: 9001) Port for objects DB (comma-separated for Redis Sentinel)
* `IOB_OBJECTSDB_PASS` (optional) Set authentication for Redis db connection - `IOB_OBJECTSDB_PASS` (optional) Password for Redis DB
* `IOB_OBJECTSDB_NAME` (optional, default: mymaster) Set name for Redis Sentinel CLuster db - `IOB_OBJECTSDB_NAME` (optional, default: mymaster) Redis Sentinel DB name
* `IOB_STATESDB_TYPE` (optional, default: jsonl) Set type of ioBroker states db, could be "jsonl", "file" (deprecated) or "redis" - `IOB_STATESDB_TYPE` (optional, default: jsonl) Type of states DB: "jsonl", "file" (deprecated), or "redis"
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Set host for ioBroker states db, supports comma separated list for Redis Sentinel Cluster - `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Host for states DB (comma-separated for Redis Sentinel)
* `IOB_STATESDB_PORT` (optional, default: 9000) Set port for ioBroker states db, supports comma separated list for Redis Sentinel Cluster - `IOB_STATESDB_PORT` (optional, default: 9000) Port for states DB (comma-separated for Redis Sentinel)
* `IOB_STATESDB_PASS` (optional) Set authentication for Redis db connection - `IOB_STATESDB_PASS` (optional) Password for Redis DB
* `IOB_STATESDB_NAME` (optional, default: mymaster) Set name for Redis Sentinel cluster db - `IOB_STATESDB_NAME` (optional, default: mymaster) Redis Sentinel DB name
### Activate special features: ### Special Features
* `AVAHI` (optional) Set `true` to install and activate avahi-daemon for supporting yahka adapter - `AVAHI` (optional) Set `true` to install and activate avahi-daemon (for yahka adapter support)
### Configure environment: ### Environment Configuration
* `DEBUG` (optional) Set `true` to get extended logging messages on container startup - `DEBUG` (optional) Set `true` for extended logging on container startup
* `LANG` (optional, default: de_DE.UTF-8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8 - `LANG` (optional, default: de_DE.UTF-8) Pre-generated: de_DE.UTF-8, en_US.UTF-8
* `LANGUAGE` (optional, default: de_DE:de) The following locales are pre-generated: de_DE:de, en_US:en - `LANGUAGE` (optional, default: de_DE:de) Pre-generated: de_DE:de, en_US:en
* `LC_ALL` (optional, default: de_DE.UTF-8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8 - `LC_ALL` (optional, default: de_DE.UTF-8) Pre-generated: de_DE.UTF-8, en_US.UTF-8
* `OFFLINE_MODE` (optional) Set `true` if your container has no or limited internet connection - `OFFLINE_MODE` (optional) Set `true` if your container has no or limited internet connection
* `PACKAGES` (optional) Install additional Linux packages to your container, packages should be separated by whitespace like this: `package1 package2 package3`. - `PACKAGES` (optional) Install additional Linux packages (space-separated list)
* `PACKAGES_UPDATE` (optional) Set `true` if you want to apply Linux package updates at the first start of a new container. - `PACKAGES_UPDATE` (optional) Set `true` to update Linux packages on first start
* `PERMISSION_CHECK` (optional, default: true) Set "false" to skip checking and correcting all relevant permissions on container startup (Use at own risk!!!) - `PERMISSION_CHECK` (optional, default: true) Set "false" to skip permission checks/corrections (use at your own risk)
* `SETGID` (default: 1000) In some cases it might be useful to specify the gid of the containers iobroker user to match an existing group on the docker host - `SETGID` (default: 1000) Set the GID for the iobroker user (to match a group on the host)
* `SETUID` (default: 1000) In some cases it might be useful to specify the uid of the containers iobroker user to match an existing user on the docker host - `SETUID` (default: 1000) Set the UID for the iobroker user (to match a user on the host)
* `TZ` (optional, default: Europe/Berlin) Specifies the time zone, could be all valid Linux timezones - `TZ` (optional, default: Europe/Berlin) Set the timezone (any valid Linux timezone)
* `USBDEVICES` (optional) Set relevant permissions on mounted devices like `/dev/ttyACM0` (inside the container), for more than one device separate with ";" - `USBDEVICES` (optional) Set permissions for mounted devices (e.g. `/dev/ttyACM0`, separate multiple devices with ";")
## Notes about Docker networks ## Notes about Docker Networks
The examples above are dealing with the Docker default bridge network. In general there are [some reasons](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge) why it might be the better choice to use a user-defined bridge network. The above examples use Docker's default bridge network. In many cases, it is better to use a user-defined bridge network.
See [Docker docs: bridge differences](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge).
Using a Docker bridge network works fine for taking a first look and with most of the ioBroker adapters (if you don't forget to redirect the ports your adapters use).<br> A bridge network works for most adapters if you map all required ports.
But some ioBroker adapters are using techniques like [Multicast](https://en.wikipedia.org/wiki/Multicast) or [Broadcast](https://en.wikipedia.org/wiki/Broadcasting_(networking)) for automatic detection of IoT devices<br> However, some adapters require [Multicast](https://en.wikipedia.org/wiki/Multicast) or [Broadcast](https://en.wikipedia.org/wiki/Broadcasting_(networking)) for device discovery.
In this case it may be useful to switch to [host](https://docs.docker.com/network/host/) or [MACVLAN](https://docs.docker.com/network/macvlan/) network. In these cases, consider using [host](https://docs.docker.com/network/host/) or [MACVLAN](https://docs.docker.com/network/macvlan/) networking.
For more information about networking with Docker please refer to the [official Docker docs](https://docs.docker.com/network/). For more information, see the [official Docker networking documentation](https://docs.docker.com/network/).
# Support the Project # Support the Project