mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-17 18:39:01 +02:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc31095c1c | ||
|
|
834fd976c0 | ||
|
|
609804ea0d | ||
|
|
0f39f7ae5e | ||
|
|
fdfbed9846 | ||
|
|
b4f7ba98b1 | ||
|
|
351bfddc8d | ||
|
|
8a8ac64952 | ||
|
|
e015276fc4 | ||
|
|
4f41716e77 | ||
|
|
d301f754f4 | ||
|
|
a0adbc121e | ||
|
|
17ac1a5bcf | ||
|
|
f440613049 | ||
|
|
7a6de5b3c5 | ||
|
|
0687a2ef18 | ||
|
|
3d191b9fd9 | ||
|
|
0cc07e148d | ||
|
|
f841ccf882 | ||
|
|
b8622098b2 | ||
|
|
9aab687492 | ||
|
|
c69f7145b3 | ||
|
|
1fbbd33979 | ||
|
|
911beabb6a | ||
|
|
945c7bfbaa | ||
|
|
19a6eb74bb | ||
|
|
1713562071 | ||
|
|
a34cdfe7bf | ||
|
|
c0eb88812f | ||
|
|
d3737203dc | ||
|
|
a87286ca08 | ||
|
|
220d07cf95 | ||
|
|
0d740d4626 |
13
Dockerfile
13
Dockerfile
@@ -4,10 +4,16 @@ MAINTAINER Andre Germann <info@buanet.de>
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y apt-utils curl avahi-daemon git libpcap-dev libavahi-compat-libdnssd-dev libfontconfig gnupg2
|
||||
RUN apt-get update && apt-get install -y build-essential python apt-utils curl avahi-daemon git libpcap-dev libavahi-compat-libdnssd-dev libfontconfig gnupg2 locales procps libudev-dev unzip sudo wget ffmpeg
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash
|
||||
RUN apt-get install -y build-essential python nodejs
|
||||
RUN apt-get install -y nodejs
|
||||
|
||||
RUN sed -i '/^rlimit-nproc/s/^\(.*\)/#\1/g' /etc/avahi/avahi-daemon.conf
|
||||
RUN sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \dpkg-reconfigure --frontend=noninteractive locales && \update-locale LANG=de_DE.UTF-8
|
||||
ENV LANG de_DE.UTF-8
|
||||
RUN cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
||||
ENV TZ Europe/Berlin
|
||||
|
||||
RUN mkdir -p /opt/iobroker/ && chmod 777 /opt/iobroker/
|
||||
RUN mkdir -p /opt/scripts/ && chmod 777 /opt/scripts/
|
||||
@@ -24,7 +30,8 @@ RUN chmod +x iobroker_startup.sh
|
||||
WORKDIR /opt/iobroker/
|
||||
|
||||
RUN npm install iobroker --unsafe-perm && echo $(hostname) > .install_host
|
||||
RUN update-rc.d iobroker.sh disable
|
||||
RUN update-rc.d iobroker.sh remove
|
||||
RUN npm install node-gyp -g
|
||||
|
||||
CMD ["sh", "/opt/scripts/iobroker_startup.sh"]
|
||||
|
||||
|
||||
29
README.md
29
README.md
@@ -1,15 +1,40 @@
|
||||
# docker-iobroker
|
||||
Docker image for ioBroker (http://iobroker.net) based on debian:latest (http://hub.docker.com/_/debian/)
|
||||
|
||||
This project creates a Docker image for running ioBroker in a Docker container. It is made for and tested on a Synology disk station with DSM 6.0.2 and Docker 1.11.2. But it should also work on other systems running Docker.<br>
|
||||
This project creates a Docker image for running ioBroker in a Docker container. It is made for and tested on a Synology Disk Station 1515+ with DSM 6 and Docker-package installed. But it should also work on other systems with Docker!<br>
|
||||
Cause the container ist based on debian:latest, it acts nearly like a full virtual machine. That makes it possible to easily add some additional dependies for some ioBroker-Adapters.
|
||||
|
||||
## Installation & Usage
|
||||
|
||||
For instructions and discussion (in german) please visit ioBroker-Forum (http://forum.iobroker.net/viewtopic.php?f=17&t=5089).
|
||||
A detailed tutorial (german) can be found on my website (https://buanet.de/2017/09/iobroker-unter-docker-auf-der-synology-diskstation/).<br>
|
||||
For discussion and support please visit ioBroker-forum-thread (http://forum.iobroker.net/viewtopic.php?f=17&t=5089) or use the comments section at the linked tutorial. Please do not contact me directly for any support-reasons. Every support-question should be answered in a public place. Thank you.
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
### v1.2.0 (2018-08-21)
|
||||
* after testing making 1.1.3beta to latest stable release
|
||||
|
||||
### v1.1.3beta (2018-08-21)
|
||||
* added ffmpeg-package for yahka to support webcams
|
||||
|
||||
### v1.1.2beta (2018-04-04)
|
||||
* added ENV for timezone issue
|
||||
|
||||
### v1.1.1beta (2018-03-29)
|
||||
* added wget package
|
||||
* updated readme.md
|
||||
|
||||
### v1.1.0 (2017-12-10)
|
||||
* changed startup call to fix restart issue
|
||||
* fixed avahi startup issue
|
||||
* fixed hostname issue
|
||||
* added z-wave support
|
||||
* added logging to /opt/scripts/docker_iobroker_log.txt
|
||||
|
||||
### v1.0.1beta (2017-08-25)
|
||||
* fixed locales issue
|
||||
|
||||
### v1.0.0 (2017-08-22)
|
||||
* moved and renamed iobroker startup script
|
||||
* disabled iobroker deamon to (hopefully) fix restart issue
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Backupscript für ein (wöchentliches) Backup von ioBroker unter Docker auf einer Synology Disk Station (Sicherung des ioBroker-Verzeichnises).
|
||||
# Vorhaltezeit der letzten Backups: 90 Tage, ältere Backups werden automatisch gelöscht.
|
||||
# Backupscript fuer ein Backup von ioBroker unter Docker auf einer Synology Disk Station (Sicherung des ioBroker-Verzeichnises).
|
||||
# Vorhaltezeit der letzten Backups: 90 Tage, ältere Backups werden automatisch geloescht.
|
||||
#
|
||||
# By André Germann
|
||||
# Version 1.0 (22.03.2017)
|
||||
# By Andre Germann
|
||||
# Version 1.1 (22.09.2017)
|
||||
#
|
||||
# ACHTUNG: Dieses Script muss vorher auf die Synology Disk Station kopiert und dann auch dort ausgeführt werden!
|
||||
# Für die geplante, regelmäßige Ausführung bietet sich der Aufgabenplaner der Disk Station an.
|
||||
# ACHTUNG: Dieses Script muss vorher auf die Synology Disk Station kopiert und dann auch dort ausgefuehrt werden!
|
||||
# Fuer die geplante, regelmaessige Ausfuehrung bietet sich der Aufgabenplaner der Disk Station an.
|
||||
#
|
||||
# ACHTUNG: Dieses Script stoppt vor der Sicherung des Verzeichnises den ioBroker Container!
|
||||
# Zur Sicherheit wird empfohlen ioBroker vor dem Backup innerhalb des Containers zu stoppen.
|
||||
# Dieses kann zum Beispiel über den vorherigen Aufruf des Scripts iobroker_stop.sh aus ioBroker heraus erledigt werden.
|
||||
# Dieses kann zum Beispiel ueber den vorherigen Aufruf des Scripts iobroker_stop.sh aus ioBroker heraus erledigt werden.
|
||||
|
||||
|
||||
# Deklaration der Variablen. Pfade und Bezeichnungen müssen ggf. entsprechend angepasst werden.
|
||||
# Deklaration der Variablen. Pfade und Bezeichnungen muessen ggf. entsprechend angepasst werden.
|
||||
|
||||
iobrokerPATH='/volume1/docker/mount/iobroker' # Pfad des gemounteten ioBroker-Verzeichnises (zu sicherndes Verzeichnis) auf der Synology Disk Station
|
||||
backupPATH='/volume1/backup/Homeautomation/iobroker/backup.weekly' # Pfad zum Speichern des Backups
|
||||
iobrokerPATH='/volume1/docker/iobroker_mount' # Pfad des gemounteten ioBroker-Verzeichnises (zu sicherndes Verzeichnis) auf der Synology Disk Station
|
||||
backupPATH='/volume1/docker/iobroker_backup/archiv' # Pfad zum Speichern des Backups
|
||||
iobrokerCONTAINERNAME='iobroker' # Name des ioBroker-Containers in Docker
|
||||
|
||||
|
||||
# Start Script - Ab hier muss nichts mehr geändert werden!
|
||||
# Start Script - Ab hier muss nichts mehr geaendert werden!
|
||||
|
||||
echo "#####################################################"
|
||||
echo "############## Backupscript gestartet. ##############"
|
||||
@@ -49,7 +49,7 @@ sleep 5
|
||||
echo ""
|
||||
echo "Der Ordner $iobrokerPATH wird gesichert..."
|
||||
|
||||
tar -czf "$backupPATH/backup-$(date +%d.%m.%y-%R).tar.gz" "$iobrokerPATH"
|
||||
tar -C "$iobrokerPATH" -czf "$backupPATH/backup-$(date +%Y-%m-%d_%H-%M).tar.gz" .
|
||||
|
||||
echo "Sicherung des Ordners erstellt."
|
||||
echo ""
|
||||
@@ -57,12 +57,12 @@ echo "######################################################"
|
||||
sleep 5
|
||||
|
||||
|
||||
# Alte Backups löschen (Löscht per "rm" alle "*.tar.gz"-Dateien im Ordner, die älter als 90 Tage sind)
|
||||
# Alte Backups loeschen (Loescht per "rm" alle "*.tar.gz"-Dateien im Ordner, die aelter als 90 Tage sind)
|
||||
|
||||
echo ""
|
||||
echo "Entfernen alter Backups aus dem Verzeichnis $backupPATH..."
|
||||
|
||||
find -P "$backupPATH/" -maxdepth 1 -type f \( -name '*.tar.gz' \) -ctime +19 -exec rm {} \;
|
||||
find -P "$backupPATH/" -maxdepth 1 -type f \( -name '*.tar.gz' \) -ctime +90 -exec rm {} \;
|
||||
|
||||
echo "Alte Backups wurden entfernt."
|
||||
echo ""
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /opt/iobroker
|
||||
|
||||
if [ -f .install_host ];
|
||||
then
|
||||
sed -i "s/$(cat .install_host)/$(hostname)/g" iobroker-data/objects.json
|
||||
./iobroker host $(cat .install_host) && echo $(hostname) > .install_host
|
||||
rm .install_host
|
||||
fi
|
||||
|
||||
/opt/scripts/avahi_startup.sh
|
||||
sleep 5
|
||||
cd /opt/iobroker
|
||||
./iobroker start
|
||||
cd /
|
||||
node node_modules/iobroker.js-controller/controller.js >/opt/scripts/docker_iobroker_log.txt 2>&1 &
|
||||
/bin/bash
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f .install_host ];
|
||||
then
|
||||
sed -i "s/$(cat .install_host)/$(hostname)/g" iobroker-data/objects.json
|
||||
rm .install_host
|
||||
fi
|
||||
|
||||
/opt/scripts/avahi_startup.sh
|
||||
sleep 5
|
||||
./iobroker start
|
||||
cd /
|
||||
/bin/bash
|
||||
Reference in New Issue
Block a user