mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-18 10:59:00 +02:00
Compare commits
31 Commits
v7.1.0-bet
...
v7.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0d182adfa | ||
|
|
d164d9f497 | ||
|
|
6fc6b71ac6 | ||
|
|
210b99c643 | ||
|
|
c8e5a424fe | ||
|
|
b4eb36223b | ||
|
|
6223cdad53 | ||
|
|
5f40675501 | ||
|
|
2bda056f36 | ||
|
|
cf175a820f | ||
|
|
3b73bdb961 | ||
|
|
2f9a19b2a9 | ||
|
|
d924e84366 | ||
|
|
6b35addabe | ||
|
|
019d1c2ace | ||
|
|
6942c69ed2 | ||
|
|
8babae506a | ||
|
|
407b4227ee | ||
|
|
a2558e3a7b | ||
|
|
6674d1b098 | ||
|
|
7c636029f9 | ||
|
|
c128a8fe29 | ||
|
|
5bfd28927d | ||
|
|
5933409df5 | ||
|
|
722a22f785 | ||
|
|
d1df4ffb1a | ||
|
|
b9d17a7bb2 | ||
|
|
c5d5d404f3 | ||
|
|
b24f70c92b | ||
|
|
3f6ff969e6 | ||
|
|
95647b0454 |
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal 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/
|
||||
17
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
17
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal 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
|
||||
32
.github/ISSUE_TEMPLATE/problem_report.yaml
vendored
Normal file
32
.github/ISSUE_TEMPLATE/problem_report.yaml
vendored
Normal 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
|
||||
1
.github/dependencies/.admin-version
vendored
1
.github/dependencies/.admin-version
vendored
@@ -0,0 +1 @@
|
||||
6.2.23
|
||||
|
||||
1
.github/dependencies/.backitup-version
vendored
1
.github/dependencies/.backitup-version
vendored
@@ -0,0 +1 @@
|
||||
2.5.4
|
||||
|
||||
1
.github/dependencies/.discovery-version
vendored
1
.github/dependencies/.discovery-version
vendored
@@ -0,0 +1 @@
|
||||
3.0.5
|
||||
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2.1.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2.1.0
|
||||
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2.1.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2.1.0
|
||||
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2.1.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2.1.0
|
||||
|
||||
2
.github/workflows/build-debian-image-dev.yml
vendored
2
.github/workflows/build-debian-image-dev.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2.1.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2.1.0
|
||||
|
||||
@@ -39,8 +39,8 @@ jobs:
|
||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
||||
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
||||
# amd64
|
||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node14/Dockerfile > ./debian/node14/Dockerfile.tmp
|
||||
mv -f ./debian/node14/Dockerfile.tmp ./debian/node14/Dockerfile
|
||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node16/Dockerfile > ./debian/node16/Dockerfile.tmp
|
||||
mv -f ./debian/node16/Dockerfile.tmp ./debian/node16/Dockerfile
|
||||
|
||||
- name: Set up manifest tool
|
||||
run: |
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2.1.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Login to DockerHub (iobroker)
|
||||
uses: docker/login-action@v2.1.0
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: ./debian
|
||||
file: ./debian/node14/Dockerfile
|
||||
file: ./debian/node16/Dockerfile
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
tags: |
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: ./debian
|
||||
file: ./debian/node14/Dockerfile
|
||||
file: ./debian/node16/Dockerfile
|
||||
push: true
|
||||
platforms: linux/arm/v7
|
||||
tags: |
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: ./debian
|
||||
file: ./debian/node14/Dockerfile
|
||||
file: ./debian/node16/Dockerfile
|
||||
push: true
|
||||
platforms: linux/arm64/v8
|
||||
tags: |
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2.1.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Login to DockerHub (buanet)
|
||||
uses: docker/login-action@v2.1.0
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
|
||||
- name: Trigger build debian latest (buanet)
|
||||
if: steps.git-check.outputs.modified == 'true'
|
||||
uses: benc-uk/workflow-dispatch@v1.1
|
||||
uses: benc-uk/workflow-dispatch@v1.2
|
||||
with:
|
||||
workflow: Build debian latest (buanet)
|
||||
repo: buanet/ioBroker.docker
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
- name: Trigger build debian latest (iobroker)
|
||||
if: steps.git-check.outputs.modified == 'true'
|
||||
uses: benc-uk/workflow-dispatch@v1.1
|
||||
uses: benc-uk/workflow-dispatch@v1.2
|
||||
with:
|
||||
workflow: Build debian latest (iobroker)
|
||||
repo: buanet/ioBroker.docker
|
||||
|
||||
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,12 +1,20 @@
|
||||
## Changelog
|
||||
|
||||
### v7.1.0-beta.1 (12.10.2022)
|
||||
* add env DEBUG for extended debugging log
|
||||
* enhance logging in iobroker-startuo.sh
|
||||
* enhance build process
|
||||
* add restart option to maintenance script
|
||||
* add strict mode for iobroker-startup.sh
|
||||
* fix "unary operator expected" error
|
||||
### v7.1.2 (08.11.2022)
|
||||
* fix hostname check ([#293](https://github.com/buanet/ioBroker.docker/issues/293))
|
||||
|
||||
### v7.1.1 (01.11.2022)
|
||||
* fix setting gid of iobroker group ([#289](https://github.com/buanet/ioBroker.docker/issues/289))
|
||||
|
||||
### v7.1.0 (31.10.2022)
|
||||
* fix [build action node issue](https://forum.iobroker.net/topic/59518/docker-image-7-0-1-auf-node-js-14/14?_=1667244004952) for iobroker/iobroker repo
|
||||
* v7.1.0-beta.1 (12.10.2022)
|
||||
* add env DEBUG for extended debugging log
|
||||
* enhance logging in iobroker-startup.sh
|
||||
* enhance build process
|
||||
* add restart option to maintenance script
|
||||
* add strict mode for iobroker-startup.sh
|
||||
* fix "unary operator expected" error
|
||||
|
||||
### v7.0.1 (05.07.2022)
|
||||
* backitup restore patch
|
||||
|
||||
86
debian/scripts/iobroker_startup.sh
vendored
86
debian/scripts/iobroker_startup.sh
vendored
@@ -28,6 +28,20 @@ set -u
|
||||
|
||||
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
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Getting date and time for logging
|
||||
dati=`date '+%Y-%m-%d %H:%M:%S'`
|
||||
|
||||
@@ -104,7 +118,7 @@ if [[ -f /opt/.firstrun ]]; then
|
||||
if [[ "$packages" != "" && "$offlinemode" = "true" ]]; then
|
||||
echo 'PACKAGES is set, but OFFLINE_MODE is \"true\". Skipping Linux package installation.'
|
||||
echo ' '
|
||||
else
|
||||
elif [[ "$packages" != "" ]]; then
|
||||
echo 'PACKAGES is set. Installing additional Linux packages.'
|
||||
echo "Checking the following packages:" $packages"..."
|
||||
echo $packages > /opt/scripts/.docker_config/.packages
|
||||
@@ -129,7 +143,7 @@ if [[ "$setgid" != "$(cat /etc/group | grep 'iobroker:' | cut -d':' -f3)" || "$s
|
||||
echo "SETUID and/ or SETGID are set to individual values."
|
||||
echo -n "Changing UID to "$setuid" and GID to "$setgid"... "
|
||||
usermod -u $setuid iobroker
|
||||
groupmod -g $setgid iobroker
|
||||
groupmod -og $setgid iobroker
|
||||
echo 'Done.'
|
||||
echo ' '
|
||||
fi
|
||||
@@ -160,9 +174,7 @@ elif [[ "$(ls *_backupiobroker.tar.gz 2> /dev/null | wc -l)" != "0" && "$(tar -z
|
||||
exit 1
|
||||
else
|
||||
echo "IoBroker backup file detected in /opt/iobroker."
|
||||
if [[ "$debug" == "true" ]]; then
|
||||
echo "[DEBUG] Backup file name: " $(ls *_backupiobroker.tar.gz)
|
||||
fi
|
||||
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Backup file name: " $(ls *_backupiobroker.tar.gz); fi
|
||||
echo -n "Preparing restore... "
|
||||
mv /opt/iobroker/*.tar.gz /opt/
|
||||
tar -xf /opt/initial_iobroker.tar -C /
|
||||
@@ -218,33 +230,39 @@ echo -n "Fixing \"sudo-bug\" by replacing sudo with gosu... "
|
||||
echo 'Done.'
|
||||
echo ' '
|
||||
|
||||
# checking hostname in ioBroker to match container hostname
|
||||
if [[ "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')" != "$(hostname)" && "$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
|
||||
# hostname check
|
||||
if [[ "$multihost" == "slave" ]]; then
|
||||
echo "IOB_MULTIHOST ist set to \"slave\". Hostname check will be skipped."
|
||||
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)
|
||||
else
|
||||
# get admin instance and hostname
|
||||
set +e
|
||||
admininstance=$(bash iobroker list instances | grep 'enabled' | grep -m 1 -o 'system.adapter.admin..')
|
||||
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
|
||||
if [[ "$debug" == "true" ]]; then
|
||||
echo "[DEBUG] There was a problem checking the hostname."
|
||||
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)
|
||||
else
|
||||
echo "There was a problem checking the hostname."
|
||||
stop_on_error
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -261,14 +279,14 @@ echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.d
|
||||
echo ' '
|
||||
|
||||
# Checking ENV for Adminport
|
||||
if [[ "$adminport" != "" ]]; then
|
||||
if [[ "$adminport" != "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="port": )[^,]*')" ]]; then
|
||||
if [[ "$adminport" != "" && "$multihost" != "slave" ]]; 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."
|
||||
if [[ "$debug" == "true" ]]; then
|
||||
echo "[DEBUG] Detected Admin Port in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="port": )[^,]*')
|
||||
fi
|
||||
echo -n "Setting Adminport to \""$adminport"\"... "
|
||||
bash iobroker set admin.0 --port $adminport
|
||||
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected Admin Port in ioBroker: " $adminportold; fi
|
||||
echo "Setting Adminport to \""$adminport"\"... "
|
||||
bash iobroker set $admininstanceshort --port $adminport
|
||||
echo 'Done.'
|
||||
echo ' '
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user