mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-18 19:09:02 +02:00
add env and reorder dockerfile
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### v7.2.0-beta.1 (coming soon)
|
||||||
|
* add env IOB_BACKITUP_EXTDB to unlock external db backups in backitup adapter
|
||||||
|
* reorder dockerfile steps to fulfill ioBroker Docker check
|
||||||
|
|
||||||
### 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))
|
||||||
|
|
||||||
|
|||||||
7
debian/node16/Dockerfile
vendored
7
debian/node16/Dockerfile
vendored
@@ -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
|
||||||
|
|||||||
7
debian/node18/Dockerfile
vendored
7
debian/node18/Dockerfile
vendored
@@ -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
|
||||||
|
|||||||
12
debian/scripts/iobroker_startup.sh
vendored
12
debian/scripts/iobroker_startup.sh
vendored
@@ -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
|
||||||
@@ -64,6 +65,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
|
||||||
@@ -249,7 +251,7 @@ else
|
|||||||
fi
|
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 -----"
|
||||||
@@ -274,6 +276,14 @@ if [[ "$adminport" != "" ]]; 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.'
|
||||||
|
|||||||
Reference in New Issue
Block a user