diff --git a/.VERSION b/.VERSION
index b48862fa..64214079 100644
--- a/.VERSION
+++ b/.VERSION
@@ -1 +1 @@
-v6.0.0-beta
+v6.1.0-beta.1
\ No newline at end of file
diff --git a/.github/workflows/build-debian-image-beta-node16.yml b/.github/workflows/build-debian-image-beta-node16.yml
index 6936c86e..1ebfc286 100644
--- a/.github/workflows/build-debian-image-beta-node16.yml
+++ b/.github/workflows/build-debian-image-beta-node16.yml
@@ -1,7 +1,8 @@
# Github action to build Docker image from beta branch (tag: beta)
-name: Build debian based image (beta-node16)
+name: Build debian image (beta-node16)
on:
+ workflow_dispatch:
pull_request:
branches:
- beta
@@ -9,7 +10,6 @@ on:
- closed
schedule:
- cron: '42 3 * * 1'
- workflow_dispatch:
jobs:
bulid-beta-node16-image:
@@ -53,13 +53,13 @@ jobs:
uses: docker/setup-buildx-action@v1.6.0
- name: Login to DockerHub
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }}
diff --git a/.github/workflows/build-debian-image-beta.yml b/.github/workflows/build-debian-image-beta.yml
index f172ebac..a0725ee5 100644
--- a/.github/workflows/build-debian-image-beta.yml
+++ b/.github/workflows/build-debian-image-beta.yml
@@ -1,5 +1,5 @@
# Github action to build Docker image from beta branch (tag: beta)
-name: Build debian based image (beta)
+name: Build debian image (beta)
on:
workflow_dispatch:
@@ -53,13 +53,13 @@ jobs:
uses: docker/setup-buildx-action@v1.6.0
- name: Login to DockerHub
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }}
diff --git a/.github/workflows/build-debian-image-dev-node16.yml b/.github/workflows/build-debian-image-dev-node16.yml
index eed6df8e..f62bd3f3 100644
--- a/.github/workflows/build-debian-image-dev-node16.yml
+++ b/.github/workflows/build-debian-image-dev-node16.yml
@@ -1,5 +1,5 @@
# Github action to build Docker image from dev branch (tag: dev)
-name: Build debian based image (dev-node16)
+name: Build debian image (dev-node16)
on:
workflow_dispatch:
@@ -49,13 +49,13 @@ jobs:
uses: docker/setup-buildx-action@v1.6.0
- name: Login to DockerHub
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }}
diff --git a/.github/workflows/build-debian-image-dev.yml b/.github/workflows/build-debian-image-dev.yml
index dd1db9ca..98dd0d2a 100644
--- a/.github/workflows/build-debian-image-dev.yml
+++ b/.github/workflows/build-debian-image-dev.yml
@@ -1,5 +1,5 @@
# Github action to build Docker image from dev branch (tag: dev)
-name: Build debian based image (dev)
+name: Build debian image (dev)
on:
workflow_dispatch:
@@ -49,13 +49,13 @@ jobs:
uses: docker/setup-buildx-action@v1.6.0
- name: Login to DockerHub
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }}
diff --git a/.github/workflows/build-debian-image-main.yml b/.github/workflows/build-debian-image-main.yml
index 6e4ba53c..e0601a14 100644
--- a/.github/workflows/build-debian-image-main.yml
+++ b/.github/workflows/build-debian-image-main.yml
@@ -1,5 +1,5 @@
# Github action to build Docker image from main branch (tag: latest)
-name: Build debian based image (latest)
+name: Build debian image (latest)
on:
workflow_dispatch:
@@ -51,13 +51,13 @@ jobs:
uses: docker/setup-buildx-action@v1.6.0
- name: Login to DockerHub (buanet)
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
registry: ghcr.io
username: ${{ secrets.PACKAGES_USER }}
diff --git a/.github/workflows/build-debian-image-main_iob.yml b/.github/workflows/build-debian-image-main_iob.yml
index 496d8354..73d91fdc 100644
--- a/.github/workflows/build-debian-image-main_iob.yml
+++ b/.github/workflows/build-debian-image-main_iob.yml
@@ -1,5 +1,5 @@
# Github action to build Docker image from main branch for iobroker/iobroker (tag: latest)
-name: Build debian based image (latest)
+name: Build debian image (latest)
on:
workflow_dispatch:
@@ -51,7 +51,7 @@ jobs:
uses: docker/setup-buildx-action@v1.6.0
- name: Login to DockerHub (iobroker)
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v1.12.0
with:
username: ${{ secrets.DOCKER_USER_IOB }}
password: ${{ secrets.DOCKER_PASS_IOB }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c8482e59..75349f06 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
## Changelog
+### v6.1.0-beta.1 (2021-12-20)
+* added autoconfirm parameter to upgrade function in maintenance script ([#229 @thost96](https://github.com/buanet/ioBroker.docker/pull/229))
+* added alias "m" for maintenance script
+
### v6.0.0 (2021-12-09)
* moving docu/ restructuring readme
* v6.0.0-beta1 (2021-10-07)
@@ -7,7 +11,7 @@
* adding beta-node16 tag for beta testing node16
* updating documentation
* v5.3.0-beta1 (2021-10-07)
- * adding check (installed) PACKAGES on startup (#201)
+ * adding check (installed) PACKAGES on startup (fixes [#201](https://github.com/buanet/ioBroker.docker/issues/201))
* adding packages for discovery adapter
* adding packages for backitup adapter
* reorganizing Dockerfile
@@ -29,12 +33,12 @@
* adding labels in OCI standard format
* adding packages update on first start
* adding file for docker detection by ioBroker adapters
- * adding best practice for states db migation in readme
+ * adding best practice for states db migration in readme
* removing couchdb option for states db (no longer supported)
* v5.2.0-beta1 (2021-05-04)
* added upgrade parameter to maintenance script
- * added expose for default admin ui port (#172)
- * added shortform for maintenance script
+ * added expose for default admin ui port (fixes [#172](https://github.com/buanet/ioBroker.docker/issues/172))
+ * added short form for maintenance script
* v5.2.0-beta (2021-04-02)
* some renaming to optimize automated build
* changes in versioning
@@ -43,7 +47,7 @@
### v5.1.0 (2020-11-05)
* v5.0.2-beta (2020-07-28)
* added docker tag for majorversion latest
- * extend readme.md doku
+ * extend readme.md docu
* added maintenance script
* added container healthcheck
* fixed configuration procedure and logging for objects and states db setup
@@ -84,7 +88,7 @@
### v4.1.0 (2020-01-17)
* improved readme.md
* v4.0.3-beta (2020-01-06)
- * added support to restore backup on startup
+ * added support to restore backup on startup ([#56 @duffbeer2000](https://github.com/buanet/ioBroker.docker/pull/56))
* small fixes according to "docker best practices"
* v4.0.2-beta (2019-12-10)
* ~~added env for activating redis~~
@@ -104,13 +108,13 @@
* v3.1.2-beta (2019-09-03)
* using node 10 instead of node 8
* v3.1.1-beta (2019-09-02)
- * adding env for setting uid/ gid for iobroker-user
+ * adding env for setting uid/ gid for iobroker-user ([#33 @mplogas](https://github.com/buanet/ioBroker.docker/pull/33))
### v3.1.0 (2019-08-21)
* v3.0.3-beta (2019-08-21)
* switching base image from "debian:latest" to "debian:stretch"
* v3.0.2-beta (2019-06-13)
- * using gosu instead of sudo
+ * using gosu instead of sudo ([#26 @SchumyHao](https://github.com/buanet/ioBroker.docker/pull/26))
* changing output of ioBroker logging
* v3.0.1-beta (2019-05-18)
* ~~switching back to iobroker-daemon for startup~~
diff --git a/debian/scripts/iobroker_startup.sh b/debian/scripts/iobroker_startup.sh
index 5a7fb412..e268ff56 100644
--- a/debian/scripts/iobroker_startup.sh
+++ b/debian/scripts/iobroker_startup.sh
@@ -86,6 +86,7 @@ then
echo "Registering maintenance script as command..."
echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
echo "alias maint=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
+ echo "alias m=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
echo "Done."
echo ' '
fi
diff --git a/debian/scripts/maintenance.sh b/debian/scripts/maintenance.sh
index a02a60aa..11aa914a 100644
--- a/debian/scripts/maintenance.sh
+++ b/debian/scripts/maintenance.sh
@@ -17,20 +17,21 @@ display_help() {
echo ''
echo "Usage: maintenance [ COMMAND ] [ OPTION ]"
echo " maint [ COMMAND ] [ OPTION ]"
+ echo " m [ COMMAND ] [ OPTION ]"
echo ''
echo "COMMANDS"
echo "------------------"
- echo " status > gives the current state of maintenance mode"
+ echo " status > reports the current state of maintenance mode"
echo " on > switches mantenance mode ON"
- echo " off > switches mantenance mode OFF and shuts down/ restarts container"
- echo " upgrade > will put container to maintenance mode and upgrade iobroker"
+ echo " off > switches mantenance mode OFF and shuts down or restarts container"
+ echo " upgrade > will put container to maintenance mode and upgrade ioBroker"
echo " help > shows this help"
echo ''
echo "OPTIONS"
echo "------------------"
echo " -y|--yes > confirms the used command without asking"
- echo " -h|--help > shows this help"
- echo ''
+ echo " -h|--help > shows this help"
+ echo ''
exit 0
}
@@ -100,11 +101,11 @@ switch_off() {
if [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode ON / autoconfirm = no
then
echo 'You are now going to deactivate maintenance mode for this container.'
- echo 'Depending on the restart policy, your container will be stopped/ restarted immediately.'
+ echo 'Depending on the restart policy, your container will be stopped or restarted immediately.'
read -p 'Do you want to continue [yes/no]? ' A
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
then
- echo 'Deactivating maintenance mode and forcing container to stop/ restart...'
+ echo 'Deactivating maintenance mode and forcing container to stop or restart...'
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
pkill -u root
echo 'Done.'
@@ -115,9 +116,9 @@ switch_off() {
elif [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "yes" ] # maintenance mode ON / autoconfirm = yes
then
echo 'You are now going to deactivate maintenance mode for this container.'
- echo 'Depending on the restart policy, your container will be stopped/ restarted immediately.'
+ echo 'Depending on the restart policy, your container will be stopped or restarted immediately.'
echo 'This command was already confirmed by -y or --yes option.'
- echo 'Deactivating maintenance mode and forcing container to stop/ restart...'
+ echo 'Deactivating maintenance mode and forcing container to stop or restart...'
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
pkill -u root
echo 'Done.'
@@ -132,31 +133,40 @@ upgrade() {
echo 'You are now going to upgrade your js-controller.'
echo 'As this will change data in /opt/iobroker, make sure you have a backup!'
echo 'During the upgrade process the container will automatically switch into maintenance mode and stop ioBroker.'
- echo 'Depending of the restart policy, you container will be stoped/ restarted automatically after the upgrade.'
- read -p 'Do you want to continue [yes/no]? ' A
- if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
+ echo 'Depending of the restart policy, your container will be stopped or restarted automatically after the upgrade.'
+
+ if [ "$autoconfirm" == "no" ]
then
- echo 'Activating maintenance mode...'
- echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
- sleep 1
- echo 'Done.'
- echo 'Stopping ioBroker...'
- pkill -u iobroker
- sleep 1
- echo 'Done.'
- echo 'Upgrading js-controller...'
- iobroker update
- iobroker upgrade self
- sleep 1
- echo 'Done.'
- echo 'Container will be stopped/ restarted in 5 seconds...'
- sleep 5
- echo "stopping" > /opt/scripts/.docker_config/.healthcheck
- pkill -u root
- exit 0
- else
- exit 0
+ read -p 'Do you want to continue [yes/no]? ' A
+ if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
+ then
+ : # Continue.
+ else
+ exit 0
+ fi
+ elif [ "$autoconfirm" == "yes" ]
+ then
+ echo 'This command was already confirmed by -y or --yes option.'
fi
+
+ echo 'Activating maintenance mode...'
+ echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
+ sleep 1
+ echo 'Done.'
+ echo 'Stopping ioBroker...'
+ pkill -u iobroker
+ sleep 1
+ echo 'Done.'
+ echo 'Upgrading js-controller...'
+ iobroker update
+ iobroker upgrade self
+ sleep 1
+ echo 'Done.'
+ echo 'Container will be stopped or restarted in 5 seconds...'
+ sleep 5
+ echo "stopping" > /opt/scripts/.docker_config/.healthcheck
+ pkill -u root
+ exit 0
}
########################################
@@ -169,7 +179,7 @@ for i in "$@"; do
reverse="$i $reverse"
done
-# checking the arguments
+# checking the arguments
for i in $reverse; do
case $i in
help|-h|--help)
@@ -218,4 +228,4 @@ for i in $reverse; do
esac
done
-exit 0
\ No newline at end of file
+exit 0
diff --git a/src/README_docker_hub_buanet.md b/src/README_docker_hub_buanet.md
index 97c8d2f9..f9a2eba5 100644
--- a/src/README_docker_hub_buanet.md
+++ b/src/README_docker_hub_buanet.md
@@ -1,8 +1,8 @@
-
+
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
[)](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml)
[](https://github.com/buanet/ioBroker.docker/releases)
[](https://github.com/buanet/ioBroker.docker/issues)
@@ -10,7 +10,7 @@
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
[](https://paypal.me/buanet)
-# Important Note
+# Important note
New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance).
@@ -93,7 +93,7 @@ You could use environment variables to auto configure your ioBroker container on
* `IOB_MULTIHOST`(optional) Sets ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)
* `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker objects db
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Sets port for ioBroker objects db
-* `IOB_OBJECTSDB_TYPE` (optional, default: file) Sets type of ioBroker objects db, cloud be "file" or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
+* `IOB_OBJECTSDB_TYPE` (optional, default: file) Sets type of ioBroker objects db, could be "file" or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker states db
* `IOB_STATESDB_PORT` (optional, default: 9000) Sets port for ioBroker states db
* `IOB_STATESDB_TYPE` (optional, default: file) Sets type of ioBroker states db, could be "file" or "redis"
diff --git a/src/README_docker_hub_iobroker.md b/src/README_docker_hub_iobroker.md
index 35de2fdb..cca5e506 100644
--- a/src/README_docker_hub_iobroker.md
+++ b/src/README_docker_hub_iobroker.md
@@ -1,15 +1,17 @@
-
+###### [iobroker/iobroker](https://hub.docker.com/r/iobroker/iobroker) is an alias for [buanet/iobroker](https://hub.docker.com/r/buanet/iobroker)
+
+
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
-[](https://hub.docker.com/repository/docker/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
+[](https://hub.docker.com/r/buanet/iobroker)
[)](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml)
[](https://github.com/buanet/ioBroker.docker/releases)
[](https://github.com/buanet/ioBroker.docker/issues)
[](https://github.com/buanet/ioBroker.docker)
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
-# Important Note
+# Important note
New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance).
@@ -92,7 +94,7 @@ You could use environment variables to auto configure your ioBroker container on
* `IOB_MULTIHOST`(optional) Sets ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)
* `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker objects db
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Sets port for ioBroker objects db
-* `IOB_OBJECTSDB_TYPE` (optional, default: file) Sets type of ioBroker objects db, cloud be "file" or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
+* `IOB_OBJECTSDB_TYPE` (optional, default: file) Sets type of ioBroker objects db, could be "file" or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker states db
* `IOB_STATESDB_PORT` (optional, default: 9000) Sets port for ioBroker states db
* `IOB_STATESDB_TYPE` (optional, default: file) Sets type of ioBroker states db, could be "file" or "redis"