Compare commits

..

43 Commits

Author SHA1 Message Date
buanet
f3b54ae427 fix paths 2022-12-12 17:37:51 +01:00
buanet
451e29ba39 add gh action 2022-12-12 17:36:39 +01:00
buanet
8d8379ca5a fix typo 2022-12-12 17:16:30 +01:00
buanet
ae43a2561b remove old versions from docs 2022-12-12 17:13:13 +01:00
buanet
d5e5ddffc9 prepare release 2022-12-12 17:10:10 +01:00
buanet
de9db3f4d7 new ioBroker versions 2022-12-08 23:45:13 +00:00
André Germann
18458e8e0c Merge pull request #304 from buanet/v7.2.0-beta.1
V7.2.0 beta.1
2022-11-30 13:59:22 +01:00
buanet
b597178246 prepare beta 2022-11-30 13:58:24 +01:00
buanet
f609f0df8e fix restart in maintenance script 2022-11-30 13:48:35 +01:00
buanet
842e120920 fix device check 2022-11-29 23:07:28 +01:00
buanet
a8a3631665 typo 2022-11-29 22:56:30 +01:00
buanet
d6ac4c2445 remove ls, change log output 2022-11-29 21:02:47 +01:00
buanet
bf348c0c5b testing 2022-11-24 21:46:18 +01:00
buanet
eb32aa20b1 small fixes 2022-11-24 21:28:54 +01:00
buanet
2102d18299 add error handling for usb devices 2022-11-24 17:49:48 +01:00
buanet
5778c62097 add aliases in maintenance script 2022-11-24 17:15:09 +01:00
buanet
b18d22ddf8 Revert "switch from apt-get to apt"
This reverts commit eba7e6c5f9.
2022-11-13 20:51:11 +01:00
buanet
eba7e6c5f9 switch from apt-get to apt 2022-11-12 21:48:26 +01:00
buanet
b0d182adfa new ioBroker versions 2022-11-10 23:48:16 +00:00
buanet
9e74270705 fix logging 2022-11-10 11:51:23 +01:00
buanet
0a99ad9f93 Merge branch 'main' into v7.2.0-beta.1 2022-11-10 09:35:44 +01:00
buanet
d164d9f497 fix packages check 2022-11-09 17:28:14 +01:00
buanet
6fc6b71ac6 add enabled filter for iob list instances 2022-11-09 13:19:23 +01:00
buanet
210b99c643 fix typo 2022-11-09 12:30:20 +01:00
buanet
c8e5a424fe fix typo 2022-11-09 10:27:57 +01:00
buanet
b4eb36223b change error handling 2022-11-09 09:00:37 +01:00
buanet
6223cdad53 skip hostname check when multihost is slave 2022-11-08 22:25:01 +01:00
buanet
5f40675501 fix set adminport 2022-11-08 21:33:54 +01:00
buanet
2bda056f36 fix admin detection 2022-11-08 21:19:58 +01:00
buanet
2ead534cfa add env to disable permission check 2022-11-08 20:21:25 +01:00
buanet
cf175a820f fix hostname check 2022-11-08 19:44:59 +01:00
André Germann
3b73bdb961 Merge pull request #297 from buanet/admin-detection-patch
Admin detection patch
2022-11-08 17:03:34 +01:00
buanet
2f9a19b2a9 fix hostname check 2022-11-08 17:00:49 +01:00
buanet
d924e84366 fix hostname check 2022-11-08 15:03:24 +01:00
buanet
183403a8b3 extend debug logging 2022-11-07 18:10:10 +01:00
André Germann
6b35addabe Update problem_report.yaml 2022-11-04 23:28:18 +01:00
André Germann
019d1c2ace Update feature_request.yaml 2022-11-04 23:27:51 +01:00
André Germann
6942c69ed2 Update feature_request.yaml 2022-11-04 23:27:03 +01:00
André Germann
8babae506a Update feature_request.yaml 2022-11-04 23:26:42 +01:00
André Germann
407b4227ee Merge pull request #295 from buanet/issue_templates
Issue templates
2022-11-04 23:21:59 +01:00
buanet
a2558e3a7b move templates 2022-11-04 09:14:22 +01:00
buanet
6674d1b098 add issue templates 2022-11-04 09:12:07 +01:00
buanet
c08b0b45f1 add env and reorder dockerfile 2022-11-02 21:55:47 +01:00
14 changed files with 356 additions and 160 deletions

View File

@@ -1 +1 @@
v7.1.1 v7.2.0

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: ioBroker Docker image discussions
url: https://github.com/buanet/ioBroker.docker/discussions
# about: You can ask your questions here.
- name: ioBroker Community Forum
url: https://forum.iobroker.net/
- name: ioBroker Discord channel
url: https://discord.gg/Ne3y6fUac3
- name: ioBroker Facebook group
url: https://www.facebook.com/groups/440499112958264/

View File

@@ -0,0 +1,17 @@
name: Feature Request
description: I want to request a new feature.
title: "[Feature Request]: "
labels: "enhancement"
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to give us your feedback!
- type: textarea
id: description
attributes:
label: Description
description: Please describe your request.
placeholder: Waht are your ideas?
validations:
required: true

View File

@@ -0,0 +1,32 @@
name: Problem Report
description: I want to report a problem.
title: "[Problem]: "
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: description
attributes:
label: Description
description: Please describe your problem.
placeholder: What happened? What did you expect?
validations:
required: true
- type: input
id: version
attributes:
label: Image version
description: Which image version do you use?
placeholder: v1.2.3
validations:
required: true
- type: textarea
id: logs
attributes:
label: Docker logs
description: Please provide the full Docker log output from your Docker container startup.
render: shell
validations:
required: true

View File

@@ -1 +1 @@
2.4.12 2.5.4

View File

@@ -1 +1 @@
3.0.5 3.1.0

View File

@@ -0,0 +1,34 @@
name: Update Docker Hub Readme
on:
push:
branches:
- main
paths:
- ./docs/README_docker_hub_buanet.md
- ./docs/README_docker_hub_iobroker.md
- .github/workflows/update-docker-readme.yml
workflow_dispatch:
jobs:
update-docker-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update Docker Hub Readme (buanet)
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
repository: buanet/iobroker
short-description: Official Docker image for ioBroker based on Debian Bullseye slim
readme-filepath: ./docs/README_docker_hub_buanet.md
- name: Update Docker Hub Readme (iobroker)
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USER_IOB }}
password: ${{ secrets.DOCKER_PASS_IOB }}
repository: iobroker/iobroker
short-description: Official Docker image for ioBroker based on Debian Bullseye slim
readme-filepath: ./docs/README_docker_hub_iobroker.md

View File

@@ -1,5 +1,19 @@
## Changelog ## Changelog
### v7.2.0 (12.12.2022)
* update docs
* v7.2.0-beta.1 (30.11.2022)
* fix restart option in maintenance script
* add error handling for usb devices
* add aliases to maintenance script
* add env PERMISSION_CHECK ([#251](https://github.com/buanet/ioBroker.docker/issues/251))
* add some more DEBUG messages to log
* add env IOB_BACKITUP_EXTDB to unlock external db backups in backitup adapter
* reorder dockerfile steps to fulfill ioBroker Docker check
### v7.1.2 (08.11.2022)
* fix hostname check ([#293](https://github.com/buanet/ioBroker.docker/issues/293))
### v7.1.1 (01.11.2022) ### v7.1.1 (01.11.2022)
* fix setting gid of iobroker group ([#289](https://github.com/buanet/ioBroker.docker/issues/289)) * fix setting gid of iobroker group ([#289](https://github.com/buanet/ioBroker.docker/issues/289))

View File

@@ -48,12 +48,13 @@ RUN chmod 777 /opt/scripts/ \
&& chmod +x /opt/scripts/*.sh \ && chmod +x /opt/scripts/*.sh \
&& chmod +x /opt/userscripts/*.sh && chmod +x /opt/userscripts/*.sh
# Install ioBroker # Prepare and install ioBroker
RUN curl -sL https://iobroker.net/install.sh | bash - \ RUN mkdir -p /opt/scripts/.docker_config/ \
&& mkdir -p /opt/scripts/.docker_config/ \
&& echo "starting" > /opt/scripts/.docker_config/.healthcheck \ && echo "starting" > /opt/scripts/.docker_config/.healthcheck \
&& echo "${VERSION}" > /opt/scripts/.docker_config/.thisisdocker \ && echo "${VERSION}" > /opt/scripts/.docker_config/.thisisdocker \
&& echo $(hostname) > /opt/.firstrun \ && echo $(hostname) > /opt/.firstrun \
# Run installer
&& curl -sL https://iobroker.net/install.sh | bash - \
# Deleting UUID from build # Deleting UUID from build
&& iobroker unsetup -y \ && iobroker unsetup -y \
# Backup initial ioBroker and userscript folder # Backup initial ioBroker and userscript folder

View File

@@ -48,12 +48,13 @@ RUN chmod 777 /opt/scripts/ \
&& chmod +x /opt/scripts/*.sh \ && chmod +x /opt/scripts/*.sh \
&& chmod +x /opt/userscripts/*.sh && chmod +x /opt/userscripts/*.sh
# Install ioBroker # Prepare and install ioBroker
RUN curl -sL https://iobroker.net/install.sh | bash - \ RUN mkdir -p /opt/scripts/.docker_config/ \
&& mkdir -p /opt/scripts/.docker_config/ \
&& echo "starting" > /opt/scripts/.docker_config/.healthcheck \ && echo "starting" > /opt/scripts/.docker_config/.healthcheck \
&& echo "${VERSION}" > /opt/scripts/.docker_config/.thisisdocker \ && echo "${VERSION}" > /opt/scripts/.docker_config/.thisisdocker \
&& echo $(hostname) > /opt/.firstrun \ && echo $(hostname) > /opt/.firstrun \
# Run installer
&& curl -sL https://iobroker.net/install.sh | bash - \
# Deleting UUID from build # Deleting UUID from build
&& iobroker unsetup -y \ && iobroker unsetup -y \
# Backup initial ioBroker and userscript folder # Backup initial ioBroker and userscript folder

View File

@@ -10,6 +10,7 @@ echo 'starting' > /opt/scripts/.docker_config/.healthcheck
set +u set +u
adminport=$IOB_ADMINPORT adminport=$IOB_ADMINPORT
avahi=$AVAHI avahi=$AVAHI
backitup=$IOB_BACKITUP_EXTDB
debug=$DEBUG debug=$DEBUG
multihost=$IOB_MULTIHOST multihost=$IOB_MULTIHOST
offlinemode=$OFFLINE_MODE offlinemode=$OFFLINE_MODE
@@ -17,6 +18,7 @@ objectsdbhost=$IOB_OBJECTSDB_HOST
objectsdbport=$IOB_OBJECTSDB_PORT objectsdbport=$IOB_OBJECTSDB_PORT
objectsdbtype=$IOB_OBJECTSDB_TYPE objectsdbtype=$IOB_OBJECTSDB_TYPE
packages=$PACKAGES packages=$PACKAGES
permissioncheck=$PERMISSION_CHECK
setgid=$SETGID setgid=$SETGID
setuid=$SETUID setuid=$SETUID
statesdbhost=$IOB_STATESDB_HOST statesdbhost=$IOB_STATESDB_HOST
@@ -28,6 +30,22 @@ set -u
pkill_timeout=10 # timeout for iobroker shutdown in seconds pkill_timeout=10 # timeout for iobroker shutdown in seconds
# Stop on error function
stop_on_error() {
if [[ "$debug" == "true" ]]; then
echo ' '
echo "[DEBUG] Debug mode prevents the container from exiting on errors."
echo "[DEBUG] This enables you to investigate or fix your issue on the command line."
echo "[DEBUG] If you want to stop or restart your container you have to do it manually."
echo "[DEBUG] IoBroker is not running!"
tail -f /dev/null
else
echo ' '
echo "This Script will exit now."
exit 1
fi
}
# Getting date and time for logging # Getting date and time for logging
dati=`date '+%Y-%m-%d %H:%M:%S'` dati=`date '+%Y-%m-%d %H:%M:%S'`
@@ -36,14 +54,14 @@ echo ' '
echo "$(printf -- '-%.0s' {1..80})" echo "$(printf -- '-%.0s' {1..80})"
echo -n "$(printf -- '-%.0s' {1..25})" && echo -n " "$dati" " && echo "$(printf -- '-%.0s' {1..25})" echo -n "$(printf -- '-%.0s' {1..25})" && echo -n " "$dati" " && echo "$(printf -- '-%.0s' {1..25})"
echo "$(printf -- '-%.0s' {1..80})" echo "$(printf -- '-%.0s' {1..80})"
echo '----- -----' echo "----- -----"
echo "----- ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗ ███████╗ ██████╗ -----" echo "----- ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗ ███████╗ ██████╗ -----"
echo "----- ██║ ██╔═══██╗ ██╔══██╗ ██╔══██╗ ██╔═══██╗ ██║ ██╔╝ ██╔════╝ ██╔══██╗ -----" echo "----- ██║ ██╔═══██╗ ██╔══██╗ ██╔══██╗ ██╔═══██╗ ██║ ██╔╝ ██╔════╝ ██╔══██╗ -----"
echo "----- ██║ ██║ ██║ ██████╔╝ ██████╔╝ ██║ ██║ █████╔╝ █████╗ ██████╔╝ -----" echo "----- ██║ ██║ ██║ ██████╔╝ ██████╔╝ ██║ ██║ █████╔╝ █████╗ ██████╔╝ -----"
echo "----- ██║ ██║ ██║ ██╔══██╗ ██╔══██╗ ██║ ██║ ██╔═██╗ ██╔══╝ ██╔══██╗ -----" echo "----- ██║ ██║ ██║ ██╔══██╗ ██╔══██╗ ██║ ██║ ██╔═██╗ ██╔══╝ ██╔══██╗ -----"
echo "----- ██║ ╚██████╔╝ ██████╔╝ ██║ ██║ ╚██████╔╝ ██║ ██╗ ███████╗ ██║ ██║ -----" echo "----- ██║ ╚██████╔╝ ██████╔╝ ██║ ██║ ╚██████╔╝ ██║ ██╗ ███████╗ ██║ ██║ -----"
echo "----- ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ -----" echo "----- ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ -----"
echo '----- -----' echo "----- -----"
echo "----- Welcome to your ioBroker Docker container! -----" echo "----- Welcome to your ioBroker Docker container! -----"
echo "----- Startupscript is now running! -----" echo "----- Startupscript is now running! -----"
echo "----- Please be patient! -----" echo "----- Please be patient! -----"
@@ -64,6 +82,7 @@ echo "----- Environment Variables
if [[ "$adminport" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_ADMINPORT: $adminport)" && echo " -----"; fi if [[ "$adminport" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_ADMINPORT: $adminport)" && echo " -----"; fi
if [[ "$avahi" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" AVAHI: $avahi)" && echo " -----"; fi if [[ "$avahi" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" AVAHI: $avahi)" && echo " -----"; fi
if [[ "$debug" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" DEBUG: $debug)" && echo " -----"; fi if [[ "$debug" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" DEBUG: $debug)" && echo " -----"; fi
if [[ "$backitup" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_BACKITUP_EXTDB: $backitup)" && echo " -----"; fi
if [[ "$multihost" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_MULTIHOST: $multihost)" && echo " -----"; fi if [[ "$multihost" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_MULTIHOST: $multihost)" && echo " -----"; fi
if [[ "$objectsdbhost" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_OBJECTSDB_HOST: $objectsdbhost)" && echo " -----"; fi if [[ "$objectsdbhost" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_OBJECTSDB_HOST: $objectsdbhost)" && echo " -----"; fi
if [[ "$objectsdbport" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_OBJECTSDB_PORT: $objectsdbport)" && echo " -----"; fi if [[ "$objectsdbport" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_OBJECTSDB_PORT: $objectsdbport)" && echo " -----"; fi
@@ -73,6 +92,7 @@ if [[ "$statesdbport" != "" ]]; then echo -n "----- " && echo
if [[ "$statesdbtype" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_STATESDB_TYPE: $statesdbtype)" && echo " -----"; fi if [[ "$statesdbtype" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" IOB_STATESDB_TYPE: $statesdbtype)" && echo " -----"; fi
if [[ "$offlinemode" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" OFFLINE_MODE: $offlinemode)" && echo " -----"; fi if [[ "$offlinemode" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" OFFLINE_MODE: $offlinemode)" && echo " -----"; fi
if [[ "$packages" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" PACKAGES: "$packages")" && echo " -----"; fi if [[ "$packages" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" PACKAGES: "$packages")" && echo " -----"; fi
if [[ "$permissioncheck" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" PERMISSION_CHECK: $permissioncheck)" && echo " -----"; fi
if [[ "$setgid" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" SETGID: $setgid)" && echo " -----"; fi if [[ "$setgid" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" SETGID: $setgid)" && echo " -----"; fi
if [[ "$setuid" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" SETUID: $setuid)" && echo " -----"; fi if [[ "$setuid" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" SETUID: $setuid)" && echo " -----"; fi
if [[ "$usbdevices" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" USBDEVICES: $usbdevices)" && echo " -----"; fi if [[ "$usbdevices" != "" ]]; then echo -n "----- " && echo -n "$(printf "%-20s %-28s" USBDEVICES: $usbdevices)" && echo " -----"; fi
@@ -80,6 +100,19 @@ if [[ "$zwave" != "" ]]; then echo -n "----- " && echo -n "$(
echo "$(printf -- '-%.0s' {1..80})" echo "$(printf -- '-%.0s' {1..80})"
echo ' ' echo ' '
# Debug loggin notice
if [[ "$debug" == "true" ]]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "!!!! DEBUG LOG ACTIVE !!!!"
echo "!!!! Environment variable DEBUG is set to true. !!!!"
echo "!!!! This will extend the logging output and may slow down container start. !!!!"
echo "!!!! Please make sure to deactivate if no longer needed. !!!!"
echo "!!!! For more information see ioBroker Docker image documentation: !!!!"
echo "!!!! https://docs.buanet.de/iobroker-docker-image/docs/ !!!!"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ' '
fi
##### #####
# STEP 1 - Preparing container # STEP 1 - Preparing container
##### #####
@@ -92,21 +125,21 @@ echo ' '
if [[ -f /opt/.firstrun ]]; then if [[ -f /opt/.firstrun ]]; then
# Updating Linux packages # Updating Linux packages
if [[ "$offlinemode" = "true" ]]; then if [[ "$offlinemode" = "true" ]]; then
echo 'OFFLINE_MODE is \"true\". Skipping Linux package updates on first run.' echo "OFFLINE_MODE is \"true\". Skipping Linux package updates on first run."
echo ' ' echo ' '
else else
echo 'Updating Linux packages on first run...' echo "Updating Linux packages on first run... "
bash /opt/scripts/setup_packages.sh -update bash /opt/scripts/setup_packages.sh -update
echo 'Done.' echo 'Done.'
echo ' ' echo ' '
fi fi
# Installing packages from ENV # Installing packages from ENV
if [[ "$packages" != "" && "$offlinemode" = "true" ]]; then if [[ "$packages" != "" && "$offlinemode" = "true" ]]; then
echo 'PACKAGES is set, but OFFLINE_MODE is \"true\". Skipping Linux package installation.' echo "PACKAGES is set, but OFFLINE_MODE is \"true\". Skipping Linux package installation."
echo ' ' echo ' '
else elif [[ "$packages" != "" ]]; then
echo 'PACKAGES is set. Installing additional Linux packages.' echo "PACKAGES is set. Installing additional Linux packages."
echo "Checking the following packages:" $packages"..." echo "Checking the following packages:" $packages"... "
echo $packages > /opt/scripts/.docker_config/.packages echo $packages > /opt/scripts/.docker_config/.packages
bash /opt/scripts/setup_packages.sh -install bash /opt/scripts/setup_packages.sh -install
echo 'Done.' echo 'Done.'
@@ -120,7 +153,7 @@ if [[ -f /opt/.firstrun ]]; then
echo 'Done.' echo 'Done.'
echo ' ' echo ' '
else else
echo 'This is not the first run of this container. Skipping first run preparation.' echo "This is not the first run of this container. Skipping first run preparation."
echo ' ' echo ' '
fi fi
@@ -160,9 +193,7 @@ elif [[ "$(ls *_backupiobroker.tar.gz 2> /dev/null | wc -l)" != "0" && "$(tar -z
exit 1 exit 1
else else
echo "IoBroker backup file detected in /opt/iobroker." echo "IoBroker backup file detected in /opt/iobroker."
if [[ "$debug" == "true" ]]; then if [[ "$debug" == "true" ]]; then echo "[DEBUG] Backup file name: " $(ls *_backupiobroker.tar.gz); fi
echo "[DEBUG] Backup file name: " $(ls *_backupiobroker.tar.gz)
fi
echo -n "Preparing restore... " echo -n "Preparing restore... "
mv /opt/iobroker/*.tar.gz /opt/ mv /opt/iobroker/*.tar.gz /opt/
tar -xf /opt/initial_iobroker.tar -C / tar -xf /opt/initial_iobroker.tar -C /
@@ -175,14 +206,14 @@ elif [[ "$(ls *_backupiobroker.tar.gz 2> /dev/null | wc -l)" != "0" && "$(tar -z
bash iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1 bash iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1
echo 'Done.' echo 'Done.'
echo ' ' echo ' '
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "!!!!! IMPORTANT NOTE !!!!!" echo "!!!! IMPORTANT NOTE !!!!"
echo "!!!!! The startup script restored iobroker from a backup file. !!!!!" echo "!!!! The startup script restored iobroker from a backup file. !!!!"
echo "!!!!! Check /opt/iobroker/log/restore.log to see if restore was successful. !!!!!" echo "!!!! Check /opt/iobroker/log/restore.log to see if restore was successful. !!!!"
echo "!!!!! When ioBroker now starts it will reinstall all Adapters automatically. !!!!!" echo "!!!! When ioBroker now starts it will reinstall all Adapters automatically. !!!!"
echo "!!!!! This might be take a looooong time! Please be patient! !!!!!" echo "!!!! This might be take a looooong time! Please be patient! !!!!"
echo "!!!!! You can view installation process by taking a look at ioBroker log. !!!!!" echo "!!!! You can view installation process by taking a look at ioBroker log. !!!!"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi fi
else else
echo "There is data detected in /opt/iobroker but it looks like it is no instance of ioBroker or a valid backup file!" echo "There is data detected in /opt/iobroker but it looks like it is no instance of ioBroker or a valid backup file!"
@@ -204,11 +235,16 @@ echo "$(printf -- '-%.0s' {1..80})"
echo ' ' echo ' '
# (Re)Setting permissions to "/opt/iobroker" and "/opt/scripts" # (Re)Setting permissions to "/opt/iobroker" and "/opt/scripts"
echo -n "(Re)setting permissions (This might take a while! Please be patient!)... " if [[ "$permissioncheck" == "false" ]]; then
chown -R $setuid:$setgid /opt/iobroker echo "PERMISSION_CHECK is set to false. Use this at your own risk!"
chown -R $setuid:$setgid /opt/scripts echo ' '
echo 'Done.' else
echo ' ' echo -n "(Re)setting permissions (This might take a while! Please be patient!)... "
chown -R $setuid:$setgid /opt/iobroker
chown -R $setuid:$setgid /opt/scripts
echo 'Done.'
echo ' '
fi
# Backing up original iobroker-file and changing sudo to gosu # Backing up original iobroker-file and changing sudo to gosu
echo -n "Fixing \"sudo-bug\" by replacing sudo with gosu... " echo -n "Fixing \"sudo-bug\" by replacing sudo with gosu... "
@@ -218,38 +254,75 @@ echo -n "Fixing \"sudo-bug\" by replacing sudo with gosu... "
echo 'Done.' echo 'Done.'
echo ' ' echo ' '
# checking hostname in ioBroker to match container hostname # hostname check
if [[ "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')" != "$(hostname)" && "$multihost" != "slave" ]]; then if [[ "$multihost" == "slave" ]]; then
echo "Hostname in ioBroker does not match the hostname of this container."
if [[ "$debug" == "true" ]]; then
echo "[DEBUG] Detected hostname in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')
echo "[DEBUG] Detected hostname in container: " $(hostname)
fi
echo -n "Updating hostname to "$(hostname)"... "
bash iobroker host $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')
echo 'Done.'
echo ' '
elif [[ "$multihost" == "slave" ]]; then
echo "IOB_MULTIHOST ist set to \"slave\". Hostname check will be skipped." echo "IOB_MULTIHOST ist set to \"slave\". Hostname check will be skipped."
echo ' ' echo ' '
elif [[ "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')" = "$(hostname)" && "$multihost" != "slave" ]]; then
echo "Hostname in ioBroker matches the hostname of this container."
if [[ "$debug" == "true" ]]; then
echo "[DEBUG] Detected hostname in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')
echo "[DEBUG] Detected hostname in container: " $(hostname)
fi
echo "No action required."
echo ' '
else else
if [[ "$debug" == "true" ]]; then # get admin instance and hostname
echo "[DEBUG] There was a problem checking the hostname." set +e
echo "[DEBUG] Detected hostname in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*') admininstance=$(bash iobroker list instances | grep 'enabled' | grep -m 1 -o 'system.adapter.admin..')
echo "[DEBUG] Detected hostname in container: " $(hostname) set -e
if [[ "$admininstance" != "" ]]; then
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin instance is:" $admininstance; fi
adminhostname=$(bash iobroker object get $admininstance --pretty | grep -oP '(?<="host": ")[^"]*')
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin hostname is:" $adminhostname; fi
else
echo "There was a problem detecting the admin instance of your iobroker."
echo "Make sure the ioBroker installation you use has an admin instance or start over with a fresh installation and restore your configuration."
echo "For more details see https://docs.buanet.de/iobroker-docker-image/docs/#restore"
stop_on_error
fi
# check hostname
if [[ "$adminhostname" != "" && "$adminhostname" != "$(hostname)" ]]; then
echo "Hostname in ioBroker does not match the hostname of this container."
echo -n "Updating hostname to "$(hostname)"... "
bash iobroker host $adminhostname
echo 'Done.'
echo ' '
elif [[ "$adminhostname" = "$(hostname)" ]]; then
echo "Hostname in ioBroker matches the hostname of this container."
echo "No action required."
echo ' '
else
echo "There was a problem checking the hostname."
stop_on_error
fi fi
fi fi
# extended debug output
if [[ "$debug" == "true" && "$multihost" != "slave" ]]; then
echo "[DEBUG] Collecting some more ioBroker debug information... "
echo ' '
# get information and send to array
IFS=$'\n'
instances_array=($(iob list instances))
repos_array=($(iob repo list))
updates_array=($(iob update))
# list iob instances
echo "[DEBUG] ##### iobroker list instances #####"
for i in ${instances_array[@]}
do
echo "[DEBUG]" $i
done
echo ' '
echo "[DEBUG] ##### iobroker repo list #####"
for i in ${repos_array[@]}
do
echo "[DEBUG]" $i
done
echo ' '
echo "[DEBUG] ##### iobroker update #####"
for i in ${updates_array[@]}
do
echo "[DEBUG]" $i
done
echo ' '
unset IFS
fi
##### #####
# STEP 4 - Setting up prerequisites for some ioBroker-adapters # STEP 4 - Setting up special sessting for ioBroker-adapters
##### #####
echo "$(printf -- '-%.0s' {1..80})" echo "$(printf -- '-%.0s' {1..80})"
echo "----- Step 4 of 5: Applying special settings -----" echo "----- Step 4 of 5: Applying special settings -----"
@@ -261,24 +334,32 @@ echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.d
echo ' ' echo ' '
# Checking ENV for Adminport # Checking ENV for Adminport
if [[ "$adminport" != "" ]]; then if [[ "$adminport" != "" && "$multihost" != "slave" ]]; then
if [[ "$adminport" != "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="port": )[^,]*')" ]]; then adminportold=$(bash iobroker object get $admininstance --pretty | grep -oP '(?<="port": )[^,]*')
admininstanceshort=$(echo $admininstance | grep -m 1 -o 'admin..')
if [[ "$adminport" != "$adminportold" ]]; then
echo "IOB_ADMINPORT is set and does not match port configured in ioBroker." echo "IOB_ADMINPORT is set and does not match port configured in ioBroker."
if [[ "$debug" == "true" ]]; then if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected Admin Port in ioBroker: " $adminportold; fi
echo "[DEBUG] Detected Admin Port in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="port": )[^,]*') echo "Setting Adminport to \""$adminport"\"... "
fi bash iobroker set $admininstanceshort --port $adminport
echo -n "Setting Adminport to \""$adminport"\"... "
bash iobroker set admin.0 --port $adminport
echo 'Done.' echo 'Done.'
echo ' ' echo ' '
fi fi
fi fi
# Checking ENV for Backitup (external database backups)
if [[ "$backitup" == "true" ]]; then
echo -n "IOB_BACKITUP_EXTDB is \"true\". Unlocking features... "
echo 'true' > /opt/scripts/.docker_config/.backitup
echo 'Done.'
echo ' '
fi
# Checking ENV for AVAHI # Checking ENV for AVAHI
if [[ "$avahi" = "true" && "$offlinemode" = "true" ]]; then if [[ "$avahi" = "true" && "$offlinemode" = "true" ]]; then
echo 'AVAHI is \"true\", but OFFLINE_MODE is also \"true\". Skipping Avahi daemon setup.' echo "AVAHI is \"true\", but OFFLINE_MODE is also \"true\". Skipping Avahi daemon setup."
elif [[ "$avahi" = "true" ]]; then elif [[ "$avahi" = "true" ]]; then
echo 'AVAHI is \"true\". Running setup script...' echo "AVAHI is \"true\". Running setup script... "
chmod 755 /opt/scripts/setup_avahi.sh chmod 755 /opt/scripts/setup_avahi.sh
bash /opt/scripts/setup_avahi.sh bash /opt/scripts/setup_avahi.sh
echo 'Done.' echo 'Done.'
@@ -287,9 +368,9 @@ fi
# Checking ENV for Z-WAVE # Checking ENV for Z-WAVE
if [[ "$zwave" = "true" && "$offlinemode" = "true" ]]; then if [[ "$zwave" = "true" && "$offlinemode" = "true" ]]; then
echo 'ZWAVE is \"true\", but OFFLINE_MODE is also \"true\". Skipping Z-Wave setup.' echo "ZWAVE is \"true\", but OFFLINE_MODE is also \"true\". Skipping Z-Wave setup."
elif [[ "$zwave" = "true" ]]; then elif [[ "$zwave" = "true" ]]; then
echo 'ZWAVE is \"true\". Running setup script...' echo "ZWAVE is \"true\". Running setup script... "
chmod 755 /opt/scripts/setup_zwave.sh chmod 755 /opt/scripts/setup_zwave.sh
bash /opt/scripts/setup_zwave.sh bash /opt/scripts/setup_zwave.sh
echo 'Done.' echo 'Done.'
@@ -298,21 +379,29 @@ fi
# checking ENV for USBDEVICES # checking ENV for USBDEVICES
if [[ "$usbdevices" != "" && "$usbdevices" != "none" ]]; then if [[ "$usbdevices" != "" && "$usbdevices" != "none" ]]; then
echo 'USBDEVICES is set.' echo "USBDEVICES is set."
IFS=';' read -ra devicearray <<< "$usbdevices" IFS=';' read -ra devicearray <<< "$usbdevices"
for i in "${devicearray[@]}" for i in "${devicearray[@]}"
do do
echo -n "Setting permissions for "$i"... " if [[ -e $i ]]; then
echo -n "Setting permissions for "$i"... "
chown root:dialout $i chown root:dialout $i
chmod g+rw $i chmod g+rw $i
echo 'Done.' echo 'Done.'
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Permissions set: " $(ls -al $i); fi
else
echo "Looks like the device \""$i"\" does not exist."
echo "Did you mount it correctly by using the \"--device\" option?"
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/#mounting-usb-devices)."
stop_on_error
fi
done done
echo ' ' echo ' '
fi fi
# Checking ENV for multihost setup # Checking ENV for multihost setup
if [[ "$multihost" != "" ]]; then if [[ "$multihost" != "" ]]; then
echo "Checking for multihost settings..." echo "Checking for multihost settings... "
# Configuring objects db host # Configuring objects db host
if [[ "$multihost" = "master" && "$objectsdbtype" = "" && "$objectsdbhost" = "" && "$objectsdbport" = "" ]]; then if [[ "$multihost" = "master" && "$objectsdbtype" = "" && "$objectsdbhost" = "" && "$objectsdbport" = "" ]]; then
echo "IOB_MULTIHOST is set to \"master\" and no external objects db is set." echo "IOB_MULTIHOST is set to \"master\" and no external objects db is set."
@@ -375,7 +464,7 @@ fi
# Checking ENVs for custom setup of objects db # Checking ENVs for custom setup of objects db
if [[ "$objectsdbtype" != "" || "$objectsdbhost" != "" || "$objectsdbport" != "" ]]; then if [[ "$objectsdbtype" != "" || "$objectsdbhost" != "" || "$objectsdbport" != "" ]]; then
echo "Checking for custom objects db settings ..." echo "Checking for custom objects db settings ... "
if [[ "$objectsdbtype" != "$(jq -r '.objects.type' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then if [[ "$objectsdbtype" != "$(jq -r '.objects.type' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then
echo "IOB_OBJECTSDB_TYPE is set and value is different from detected ioBroker installation." echo "IOB_OBJECTSDB_TYPE is set and value is different from detected ioBroker installation."
echo -n "Setting type of objects db to \""$objectsdbtype"\"... " echo -n "Setting type of objects db to \""$objectsdbtype"\"... "
@@ -403,13 +492,13 @@ if [[ "$objectsdbtype" != "" || "$objectsdbhost" != "" || "$objectsdbport" != ""
else else
echo "IOB_OBJECTSDB_PORT is set and value meets detected ioBroker installation." echo "IOB_OBJECTSDB_PORT is set and value meets detected ioBroker installation."
fi fi
echo "Done." echo 'Done.'
echo ' ' echo ' '
fi fi
# Checking ENVs for custom setup of states db # Checking ENVs for custom setup of states db
if [[ "$statesdbtype" != "" || "$statesdbhost" != "" || "$statesdbport" != "" ]]; then if [[ "$statesdbtype" != "" || "$statesdbhost" != "" || "$statesdbport" != "" ]]; then
echo "Checking for custom states db settings..." echo "Checking for custom states db settings... "
if [[ "$statesdbtype" != "$(jq -r '.states.type' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then if [[ "$statesdbtype" != "$(jq -r '.states.type' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then
echo "IOB_STATESDB_TYPE is set and value is different from detected ioBroker installation." echo "IOB_STATESDB_TYPE is set and value is different from detected ioBroker installation."
echo -n "Setting type of states db to \""$statesdbtype"\"... " echo -n "Setting type of states db to \""$statesdbtype"\"... "
@@ -437,7 +526,7 @@ if [[ "$statesdbtype" != "" || "$statesdbhost" != "" || "$statesdbport" != "" ]]
else else
echo "IOB_STATESDB_PORT is set and value meets detected ioBroker installation." echo "IOB_STATESDB_PORT is set and value meets detected ioBroker installation."
fi fi
echo "Done." echo 'Done.'
echo ' ' echo ' '
fi fi
@@ -452,17 +541,17 @@ if [[ `find /opt/userscripts -type f | wc -l` -lt 1 ]]; then
elif [[ -f /opt/userscripts/userscript_firststart.sh || -f /opt/userscripts/userscript_everystart.sh ]]; then elif [[ -f /opt/userscripts/userscript_firststart.sh || -f /opt/userscripts/userscript_everystart.sh ]]; then
if [[ -f /opt/userscripts/userscript_firststart.sh && -f /opt/.firstrun ]]; then if [[ -f /opt/userscripts/userscript_firststart.sh && -f /opt/.firstrun ]]; then
echo "Userscript for first start detected and this is the first start of a new container." echo "Userscript for first start detected and this is the first start of a new container."
echo "Running userscript_firststart.sh..." echo "Running userscript_firststart.sh... "
chmod 755 /opt/userscripts/userscript_firststart.sh chmod 755 /opt/userscripts/userscript_firststart.sh
bash /opt/userscripts/userscript_firststart.sh bash /opt/userscripts/userscript_firststart.sh
echo "Done." echo 'Done.'
echo ' ' echo ' '
fi fi
if [[ -f /opt/userscripts/userscript_everystart.sh ]]; then if [[ -f /opt/userscripts/userscript_everystart.sh ]]; then
echo "Userscript for every start detected. Running userscript_everystart.sh..." echo "Userscript for every start detected. Running userscript_everystart.sh... "
chmod 755 /opt/userscripts/userscript_everystart.sh chmod 755 /opt/userscripts/userscript_everystart.sh
bash /opt/userscripts/userscript_everystart.sh bash /opt/userscripts/userscript_everystart.sh
echo "Done." echo 'Done.'
echo ' ' echo ' '
fi fi
fi fi
@@ -479,7 +568,7 @@ echo "$(printf -- '-%.0s' {1..80})"
echo "----- Step 5 of 5: ioBroker startup -----" echo "----- Step 5 of 5: ioBroker startup -----"
echo "$(printf -- '-%.0s' {1..80})" echo "$(printf -- '-%.0s' {1..80})"
echo ' ' echo ' '
echo "Starting ioBroker..." echo "Starting ioBroker... "
echo ' ' echo ' '
echo "##### #### ### ## # iobroker.js-controller log output # ## ### #### #####" echo "##### #### ### ## # iobroker.js-controller log output # ## ### #### #####"
@@ -490,7 +579,7 @@ echo "running" > /opt/scripts/.docker_config/.healthcheck
shut_down() { shut_down() {
echo ' ' echo ' '
echo "Recived termination signal (SIGTERM)." echo "Recived termination signal (SIGTERM)."
echo "Shutting down ioBroker..." echo "Shutting down ioBroker... "
local status timeout local status timeout
@@ -508,7 +597,7 @@ shut_down() {
# pgrep exits with status 1 when there are no matches # pgrep exits with status 1 when there are no matches
while pgrep -u iobroker > /dev/null; (( $? != 1 )); do while pgrep -u iobroker > /dev/null; (( $? != 1 )); do
if (($(date +%s) > timeout)); then if (($(date +%s) > timeout)); then
echo -e '\nTimeout reached. Killing remaining processes...' echo -e '\nTimeout reached. Killing remaining processes... '
pkill --signal SIGKILL -u iobroker pkill --signal SIGKILL -u iobroker
echo 'Done. Have a nice day!' echo 'Done. Have a nice day!'
exit exit

View File

@@ -158,33 +158,6 @@ upgrade_jscontroller() {
pkill -u root pkill -u root
} }
# restart container
restart_container() {
echo 'You are now going to call a restart of your container.'
echo 'Restarting will work depending on the configured restart policy.'
if [[ "$autoconfirm" != yes ]]; then
local reply
read -rp 'Do you want to continue [yes/no]? ' reply
if [[ "$reply" == y || "$reply" == Y || "$reply" == yes ]]; then
: # continue
else
return 1
fi
else
echo 'This command was already confirmed by the -y or --yes option.'
fi
echo -n 'Stopping ioBroker...'
stop_iob
echo 'Container will be stopped or restarted in 5 seconds...'
sleep 5
echo 'stopping' > "$healthcheck"
pkill -u root
}
# stop iobroker and wait until all processes stopped or pkill_timeout is reached # stop iobroker and wait until all processes stopped or pkill_timeout is reached
stop_iob() { stop_iob() {
local status timeout local status timeout
@@ -217,6 +190,33 @@ stop_iob() {
echo -e '\nDone.' echo -e '\nDone.'
} }
# restart container
restart_container() {
echo 'You are now going to call a restart of your container.'
echo 'Restarting will work depending on the configured restart policy.'
if [[ "$autoconfirm" != yes ]]; then
local reply
read -rp 'Do you want to continue [yes/no]? ' reply
if [[ "$reply" == y || "$reply" == Y || "$reply" == yes ]]; then
: # continue
else
return 1
fi
else
echo 'This command was already confirmed by the -y or --yes option.'
fi
echo -n 'Stopping ioBroker...'
stop_iob
echo 'Container will be stopped or restarted in 5 seconds...'
sleep 5
echo 'stopping' > "$healthcheck"
pkill -u root
}
# parsing commands and options # parsing commands and options
# default command to run unless another was given # default command to run unless another was given
@@ -227,7 +227,7 @@ for arg in "$@"; do
help|-h|--help) help|-h|--help)
run=(display_help) run=(display_help)
;; ;;
status) status|stat|s)
run=(maintenance_status) run=(maintenance_status)
;; ;;
on) on)
@@ -236,10 +236,10 @@ for arg in "$@"; do
off) off)
run=(disable_maintenance) run=(disable_maintenance)
;; ;;
upgrade) upgrade|upgr|u)
run=(upgrade_jscontroller) run=(upgrade_jscontroller)
;; ;;
restart) restart|rest|r)
run=(restart_container) run=(restart_container)
;; ;;
-y|--yes) -y|--yes)

View File

@@ -29,18 +29,14 @@ New major image versions (e.g. v4, v5, v6) always come with a new major version
It is highly recommended not to use the `latest` tag for production, especially when using any kind of automated update procedure like watchtower. Please use the `latest-v[X]` tag instead. It is highly recommended not to use the `latest` tag for production, especially when using any kind of automated update procedure like watchtower. Please use the `latest-v[X]` tag instead.
### Node 16 versions ### Node 16 versions
* [`v7.0.1`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`latest-v7`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`latest`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile) * [`v7.2.0`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`v7.2.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`v7.2.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`v7.2.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`latest-v7`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`latest`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile)
* [`v7.0.0`](https://github.com/buanet/ioBroker.docker/blob/v7.0.0/debian/node16/Dockerfile), [`v7.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.0.0/debian/node16/Dockerfile), [`v7.0.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.0.0/debian/node16/Dockerfile), [`v7.0.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.0.0/debian/node16/Dockerfile) * [`v7.1.2`](https://github.com/buanet/ioBroker.docker/blob/v7.1.2/debian/node16/Dockerfile), [`v7.1.2-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.1.2/debian/node16/Dockerfile), [`v7.1.2-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.1.2/debian/node16/Dockerfile), [`v7.1.2-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.1.2/debian/node16/Dockerfile)
* [`v7.0.1`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile)
### Node 14 versions ### Node 14 versions
* [`v6.1.0`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`latest-v6`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile) * [`v6.1.0`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`latest-v6`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile)
* [`v6.0.0`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile) * [`v6.0.0`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile)
### Node 12 versions
* [`v5.2.0`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`latest-v5`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile)
* [`v5.1.0`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/amd64/Dockerfile), [`v5.1.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/amd64/Dockerfile), [`v5.1.0-armv7hf`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/armv7hf/Dockerfile), [`v5.1.0-aarch64`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/aarch64/Dockerfile)
* [`v5.0.0`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/amd64/Dockerfile), [`v5.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/amd64/Dockerfile), [`v5.0.0-armv7hf`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/armv7hf/Dockerfile), [`v5.0.0-aarch64`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/aarch64/Dockerfile)
# What is ioBroker? # What is ioBroker?
IoBroker is a open source IoT platform written in JavaScript that easily connects smarthome components from different manufactures. With the help of plugins (called: "adapters") ioBroker is able to communicate with a big variety of IoT hardware and services using different protocols and APIs.<br> IoBroker is a open source IoT platform written in JavaScript that easily connects smarthome components from different manufactures. With the help of plugins (called: "adapters") ioBroker is able to communicate with a big variety of IoT hardware and services using different protocols and APIs.<br>
@@ -94,32 +90,34 @@ You could use environment variables to auto configure your ioBroker container on
### Configure ioBroker application: ### Configure ioBroker application:
* `IOB_ADMINPORT`(optional, default: 8081) Sets ioBroker adminport on startup * `IOB_ADMINPORT` (optional, default: 8081) Set ioBroker adminport on startup
* `IOB_MULTIHOST`(optional) Sets ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!) * `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_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker objects db * `IOB_MULTIHOST` (optional) Set ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Sets port for ioBroker objects db * `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Set host for ioBroker objects db
* `IOB_OBJECTSDB_TYPE` (optional, default: jsonl) Sets type of ioBroker objects db, could be "jsonl", "file" (deprecated) or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)). * `IOB_OBJECTSDB_PORT` (optional, default: 9001) Set port for ioBroker objects db
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker states db * `IOB_OBJECTSDB_TYPE` (optional, default: jsonl) Set type of ioBroker objects db, could be "jsonl", "file" (deprecated) or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
* `IOB_STATESDB_PORT` (optional, default: 9000) Sets port for ioBroker states db * `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Set host for ioBroker states db
* `IOB_STATESDB_TYPE` (optional, default: jsonl) Sets type of ioBroker states db, could be "jsonl", "file" (deprecated) or "redis" * `IOB_STATESDB_PORT` (optional, default: 9000) Set port for ioBroker states db
* `IOB_STATESDB_TYPE` (optional, default: jsonl) Set type of ioBroker states db, could be "jsonl", "file" (deprecated) or "redis"
### Activate special features: ### Activate special features:
* `AVAHI` (optional, default: false) Installs and activates avahi-daemon for supporting yahka-adapter, can be "true" or "false" * `AVAHI` (optional) Set "true" to install and activate avahi-daemon for supporting yahka-adapter
* `ZWAVE` (optional, default: false) Installs openzwave to support zwave-adapter, can be "true" or "false" * `ZWAVE` (optional) Set "true" to install openzwave to support zwave-adapter
### Configure environment: ### Configure environment:
* `DEBUG` (optional, default: false) Set true to get extended logging messages on container startup * `DEBUG` (optional) Set "true" to get extended logging messages on container startup
* `LANG` (optional, default: de_DE.UTF&#x2011;8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8 * `LANG` (optional, default: de_DE.UTF-8) The following locales are 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) The following locales are 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) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
* `OFFLINE_MODE` (optional & experimental, default: false) Set true if you container has no or limited internet connection * `OFFLINE_MODE` (optional) Set "true" if your container has no or limited internet connection
* `PACKAGES` (optional) Installs additional linux packages to your container, packages should be separated by whitespace like this: "package1 package2 package3". * `PACKAGES` (optional) Install additional linux packages to your container, packages should be separated by whitespace like this: "package1 package2 package3".
* `PERMISSION_CHECK` (optional, default: true) Set "false" to skip checking and correcting all relevant permissions on container startup (Use at 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) 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
* `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) 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
* `TZ` (optional, default: Europe/Berlin) Specifies the time zone * `TZ` (optional, default: Europe/Berlin) Specifies the time zone, could be all valid Linux timezones
* `USBDEVICES` (optional) Sets relevant permissions on mounted devices like "/dev/ttyACM0". For more than one device separate with ";". * `USBDEVICES` (optional) Set relevant permissions on mounted devices like "/dev/ttyACM0" (inside the container), for more than one device separate with ";"
## Notes about Docker networks ## Notes about Docker networks

View File

@@ -30,17 +30,14 @@ New major image versions (e.g. v4, v5, v6) always come with a new major version
It is highly recommended not to use the `latest` tag for production, especially when using any kind of automated update procedure like watchtower. Please use the `latest-v[X]` tag instead. It is highly recommended not to use the `latest` tag for production, especially when using any kind of automated update procedure like watchtower. Please use the `latest-v[X]` tag instead.
### Node 16 versions ### Node 16 versions
* [`v7.0.1`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`latest-v7`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`latest`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile) * [`v7.2.0`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`v7.2.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`v7.2.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`v7.2.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`latest-v7`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile), [`latest`](https://github.com/buanet/ioBroker.docker/blob/v7.2.0/debian/node16/Dockerfile)
* [`v7.0.0`](https://github.com/buanet/ioBroker.docker/blob/v7.0.0/debian/node16/Dockerfile), [`v7.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.0.0/debian/node16/Dockerfile), [`v7.0.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.0.0/debian/node16/Dockerfile), [`v7.0.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.0.0/debian/node16/Dockerfile) * [`v7.1.2`](https://github.com/buanet/ioBroker.docker/blob/v7.1.2/debian/node16/Dockerfile), [`v7.1.2-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.1.2/debian/node16/Dockerfile), [`v7.1.2-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.1.2/debian/node16/Dockerfile), [`v7.1.2-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.1.2/debian/node16/Dockerfile)
* [`v7.0.1`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-amd64`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile), [`v7.0.1-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v7.0.1/debian/node16/Dockerfile)
### Node 14 versions ### Node 14 versions
* [`v6.1.0`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`latest-v6`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile) * [`v6.1.0`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`v6.1.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile), [`latest-v6`](https://github.com/buanet/ioBroker.docker/blob/v6.1.0/debian/node14/Dockerfile)
* [`v6.0.0`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile) * [`v6.0.0`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile)
### Node 12 versions
* [`v5.2.0`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`latest-v5`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile)
* [`v5.1.0`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/amd64/Dockerfile), [`v5.1.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/amd64/Dockerfile), [`v5.1.0-armv7hf`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/armv7hf/Dockerfile), [`v5.1.0-aarch64`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/aarch64/Dockerfile)
* [`v5.0.0`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/amd64/Dockerfile), [`v5.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/amd64/Dockerfile), [`v5.0.0-armv7hf`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/armv7hf/Dockerfile), [`v5.0.0-aarch64`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/aarch64/Dockerfile)
# What is ioBroker? # What is ioBroker?
@@ -95,32 +92,34 @@ You could use environment variables to auto configure your ioBroker container on
### Configure ioBroker application: ### Configure ioBroker application:
* `IOB_ADMINPORT`(optional, default: 8081) Sets ioBroker adminport on startup * `IOB_ADMINPORT` (optional, default: 8081) Set ioBroker adminport on startup
* `IOB_MULTIHOST`(optional) Sets ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!) * `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_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker objects db * `IOB_MULTIHOST` (optional) Set ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Sets port for ioBroker objects db * `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Set host for ioBroker objects db
* `IOB_OBJECTSDB_TYPE` (optional, default: jsonl) Sets type of ioBroker objects db, could be "jsonl", "file" (deprecated) or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)). * `IOB_OBJECTSDB_PORT` (optional, default: 9001) Set port for ioBroker objects db
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker states db * `IOB_OBJECTSDB_TYPE` (optional, default: jsonl) Set type of ioBroker objects db, could be "jsonl", "file" (deprecated) or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
* `IOB_STATESDB_PORT` (optional, default: 9000) Sets port for ioBroker states db * `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Set host for ioBroker states db
* `IOB_STATESDB_TYPE` (optional, default: jsonl) Sets type of ioBroker states db, could be "jsonl", "file" (deprecated) or "redis" * `IOB_STATESDB_PORT` (optional, default: 9000) Set port for ioBroker states db
* `IOB_STATESDB_TYPE` (optional, default: jsonl) Set type of ioBroker states db, could be "jsonl", "file" (deprecated) or "redis"
### Activate special features: ### Activate special features:
* `AVAHI` (optional, default: false) Installs and activates avahi-daemon for supporting yahka-adapter, can be "true" or "false" * `AVAHI` (optional) Set "true" to install and activate avahi-daemon for supporting yahka-adapter
* `ZWAVE` (optional, default: false) Installs openzwave to support zwave-adapter, can be "true" or "false" * `ZWAVE` (optional) Set "true" to install openzwave to support zwave-adapter
### Configure environment: ### Configure environment:
* `DEBUG` (optional, default: false) Set true to get extended logging messages on container startup * `DEBUG` (optional) Set "true" to get extended logging messages on container startup
* `LANG` (optional, default: de_DE.UTF&#x2011;8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8 * `LANG` (optional, default: de_DE.UTF-8) The following locales are 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) The following locales are 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) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
* `OFFLINE_MODE` (optional & experimental, default: false) Set true if you container has no or limited internet connection * `OFFLINE_MODE` (optional) Set "true" if your container has no or limited internet connection
* `PACKAGES` (optional) Installs additional linux packages to your container, packages should be separated by whitespace like this: "package1 package2 package3". * `PACKAGES` (optional) Install additional linux packages to your container, packages should be separated by whitespace like this: "package1 package2 package3".
* `PERMISSION_CHECK` (optional, default: true) Set "false" to skip checking and correcting all relevant permissions on container startup (Use at 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) 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
* `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) 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
* `TZ` (optional, default: Europe/Berlin) Specifies the time zone * `TZ` (optional, default: Europe/Berlin) Specifies the time zone, could be all valid Linux timezones
* `USBDEVICES` (optional) Sets relevant permissions on mounted devices like "/dev/ttyACM0". For more than one device separate with ";". * `USBDEVICES` (optional) Set relevant permissions on mounted devices like "/dev/ttyACM0" (inside the container), for more than one device separate with ";"
## Notes about Docker networks ## Notes about Docker networks