add env and reorder dockerfile

This commit is contained in:
buanet
2022-11-02 21:55:47 +01:00
parent 7c636029f9
commit c08b0b45f1
5 changed files with 24 additions and 8 deletions

View File

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

View File

@@ -1,5 +1,9 @@
## 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)
* fix setting gid of iobroker group ([#289](https://github.com/buanet/ioBroker.docker/issues/289))

View File

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

View File

@@ -10,6 +10,7 @@ echo 'starting' > /opt/scripts/.docker_config/.healthcheck
set +u
adminport=$IOB_ADMINPORT
avahi=$AVAHI
backitup=$IOB_BACKITUP_EXTDB
debug=$DEBUG
multihost=$IOB_MULTIHOST
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 [[ "$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 [[ "$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 [[ "$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
@@ -249,7 +251,7 @@ else
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 "----- Step 4 of 5: Applying special settings -----"
@@ -274,6 +276,14 @@ if [[ "$adminport" != "" ]]; then
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
if [[ "$avahi" = "true" && "$offlinemode" = "true" ]]; then
echo 'AVAHI is \"true\", but OFFLINE_MODE is also \"true\". Skipping Avahi daemon setup.'