mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-18 10:59:00 +02:00
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,9 +1,14 @@
|
||||
## Changelog
|
||||
|
||||
### v5.2.0-beta3 (2021-09-04)
|
||||
* reducing layers in dockerfile
|
||||
* making hostname check mandatory for startup
|
||||
* optimize startup log
|
||||
### v5.2.0-beta4 (2021-09-10)
|
||||
* adding iobroker user rights for "gosu"
|
||||
* adding more labels in OCI standard format
|
||||
* fixing workdir bug
|
||||
* adding backitup compatibility
|
||||
* v5.2.0-beta3 (2021-09-04)
|
||||
* reducing layers in dockerfile
|
||||
* making hostname check mandatory for startup
|
||||
* optimize startup log
|
||||
* v5.2.0-beta2 (2021-08-28)
|
||||
* redesign maintenance script
|
||||
* switching amd64 base image to debian bullseye slim
|
||||
|
||||
18
debian/node12/Dockerfile
vendored
18
debian/node12/Dockerfile
vendored
@@ -1,9 +1,12 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
LABEL org.opencontainers.image.title="ioBroker Docker Image" \
|
||||
org.opencontainers.image.description="Docker image for ioBroker smarthome software" \
|
||||
org.opencontainers.image.authors="info@buanet.de" \
|
||||
LABEL org.opencontainers.image.title="Official ioBroker Docker Image" \
|
||||
org.opencontainers.image.description="Officical Docker image for ioBroker smarthome software (https://www.iobroker.net)" \
|
||||
org.opencontainers.image.documentation="https://github.com/buanet/ioBroker.docker#readme" \
|
||||
org.opencontainers.image.authors="André Germann <info@buanet.de>" \
|
||||
org.opencontainers.image.url="https://github.com/buanet/ioBroker.docker" \
|
||||
org.opencontainers.image.source="https://github.com/buanet/ioBroker.docker" \
|
||||
org.opencontainers.image.base.name="docker.io/library/debian:bullseye-slim" \
|
||||
org.opencontainers.image.version="${VERSION}" \
|
||||
org.opencontainers.image.created="${DATI}"
|
||||
|
||||
@@ -53,11 +56,13 @@ RUN apt-get update \
|
||||
&& tar -cf /opt/initial_userscripts.tar /opt/userscripts \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Setting up iobroker-user (shell and home directory)
|
||||
# Setting up iobroker-user (shell, home dir and rights)
|
||||
RUN chsh -s /bin/bash iobroker \
|
||||
&& usermod --home /opt/iobroker iobroker \
|
||||
&& usermod -u 1000 iobroker \
|
||||
&& groupmod -g 1000 iobroker
|
||||
&& groupmod -g 1000 iobroker \
|
||||
&& chown root:iobroker /usr/sbin/gosu \
|
||||
&& chmod +s /usr/sbin/gosu
|
||||
|
||||
# Setting up default ENVs
|
||||
ENV DEBIAN_FRONTEND="teletype" \
|
||||
@@ -71,6 +76,9 @@ ENV DEBIAN_FRONTEND="teletype" \
|
||||
# Expose default admin ui port
|
||||
EXPOSE 8081
|
||||
|
||||
# Change work dir
|
||||
WORKDIR /opt/iobroker/
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --interval=15s --timeout=5s --retries=5 \
|
||||
CMD ["/bin/bash", "-c", "/opt/scripts/healthcheck.sh"]
|
||||
|
||||
18
debian/node14/Dockerfile
vendored
18
debian/node14/Dockerfile
vendored
@@ -1,9 +1,12 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
LABEL org.opencontainers.image.title="ioBroker Docker Image" \
|
||||
org.opencontainers.image.description="Docker image for ioBroker smarthome software" \
|
||||
org.opencontainers.image.authors="info@buanet.de" \
|
||||
LABEL org.opencontainers.image.title="Official ioBroker Docker Image" \
|
||||
org.opencontainers.image.description="Officical Docker image for ioBroker smarthome software (https://www.iobroker.net)" \
|
||||
org.opencontainers.image.documentation="https://github.com/buanet/ioBroker.docker#readme" \
|
||||
org.opencontainers.image.authors="André Germann <info@buanet.de>" \
|
||||
org.opencontainers.image.url="https://github.com/buanet/ioBroker.docker" \
|
||||
org.opencontainers.image.source="https://github.com/buanet/ioBroker.docker" \
|
||||
org.opencontainers.image.base.name="docker.io/library/debian:bullseye-slim" \
|
||||
org.opencontainers.image.version="${VERSION}" \
|
||||
org.opencontainers.image.created="${DATI}"
|
||||
|
||||
@@ -53,11 +56,13 @@ RUN apt-get update \
|
||||
&& tar -cf /opt/initial_userscripts.tar /opt/userscripts \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Setting up iobroker-user (shell and home directory)
|
||||
# Setting up iobroker-user (shell, home dir and rights)
|
||||
RUN chsh -s /bin/bash iobroker \
|
||||
&& usermod --home /opt/iobroker iobroker \
|
||||
&& usermod -u 1000 iobroker \
|
||||
&& groupmod -g 1000 iobroker
|
||||
&& groupmod -g 1000 iobroker \
|
||||
&& chown root:iobroker /usr/sbin/gosu \
|
||||
&& chmod +s /usr/sbin/gosu
|
||||
|
||||
# Setting up default ENVs
|
||||
ENV DEBIAN_FRONTEND="teletype" \
|
||||
@@ -71,6 +76,9 @@ ENV DEBIAN_FRONTEND="teletype" \
|
||||
# Expose default admin ui port
|
||||
EXPOSE 8081
|
||||
|
||||
# Change work dir
|
||||
WORKDIR /opt/iobroker/
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --interval=15s --timeout=5s --retries=5 \
|
||||
CMD ["/bin/bash", "-c", "/opt/scripts/healthcheck.sh"]
|
||||
|
||||
19
debian/scripts/maintenance.sh
vendored
19
debian/scripts/maintenance.sh
vendored
@@ -5,6 +5,7 @@
|
||||
############################
|
||||
|
||||
autoconfirm=no # could be set to true by commandline option
|
||||
killbyname=no # could be set to true by commandline option / undocumented, only for use with backitup restore scripts
|
||||
|
||||
####################################
|
||||
##### declaration of functions #####
|
||||
@@ -46,7 +47,19 @@ check_status() {
|
||||
|
||||
# turn maintenance mode ON
|
||||
switch_on() {
|
||||
if [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode OFF / autoconfirm = no
|
||||
if [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ] && [ "$killbyname" == "yes" ] # maintenance mode OFF / killbyname = yes / undocumented, only for use with backitup restore scripts
|
||||
then
|
||||
echo 'This command will activate maintenance mode and stop all node processes.'
|
||||
echo 'Activating maintenance mode...'
|
||||
echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
|
||||
sleep 1
|
||||
echo 'Done.'
|
||||
echo 'Stopping ioBroker...'
|
||||
pkill node
|
||||
sleep 1
|
||||
echo 'Done.'
|
||||
exit 0
|
||||
elif [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode OFF / autoconfirm = no
|
||||
then
|
||||
echo 'You are now going to stop ioBroker and activating maintenance mode for this container.'
|
||||
read -p 'Do you want to continue [yes/no]? ' A
|
||||
@@ -183,6 +196,10 @@ for i in $reverse; do
|
||||
autoconfirm=yes # setting autoconfrm option to "yes"
|
||||
shift
|
||||
;;
|
||||
-kbn|--killbyname)
|
||||
killbyname=yes # setting killbyname option to "yes"
|
||||
shift
|
||||
;;
|
||||
-a=*|--argument=*) # dummy exaple for parsing option with value
|
||||
ARGUMENT="${i#*=}"
|
||||
shift
|
||||
|
||||
Reference in New Issue
Block a user