Compare commits

...

23 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
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
2ead534cfa add env to disable permission check 2022-11-08 20:21:25 +01:00
buanet
183403a8b3 extend debug logging 2022-11-07 18:10:10 +01:00
buanet
c08b0b45f1 add env and reorder dockerfile 2022-11-02 21:55:47 +01:00
10 changed files with 239 additions and 124 deletions

View File

@@ -1 +1 @@
v7.1.2 v7.2.0

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,16 @@
## 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) ### v7.1.2 (08.11.2022)
* fix hostname check ([#293](https://github.com/buanet/ioBroker.docker/issues/293)) * fix hostname check ([#293](https://github.com/buanet/ioBroker.docker/issues/293))

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
@@ -38,6 +40,8 @@ stop_on_error() {
echo "[DEBUG] IoBroker is not running!" echo "[DEBUG] IoBroker is not running!"
tail -f /dev/null tail -f /dev/null
else else
echo ' '
echo "This Script will exit now."
exit 1 exit 1
fi fi
} }
@@ -50,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! -----"
@@ -78,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
@@ -87,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
@@ -94,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
##### #####
@@ -106,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 ' '
elif [[ "$packages" != "" ]]; then 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.'
@@ -134,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
@@ -187,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!"
@@ -216,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... "
@@ -266,8 +290,39 @@ else
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 -----"
@@ -292,11 +347,19 @@ if [[ "$adminport" != "" && "$multihost" != "slave" ]]; then
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.'
@@ -305,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.'
@@ -316,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."
@@ -393,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"\"... "
@@ -421,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"\"... "
@@ -455,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
@@ -470,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
@@ -497,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 # ## ### #### #####"
@@ -508,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
@@ -526,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