mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-18 19:09:02 +02:00
additional packages setup
This commit is contained in:
@@ -49,8 +49,10 @@ RUN mkdir -p /opt/scripts/ \
|
|||||||
WORKDIR /opt/scripts/
|
WORKDIR /opt/scripts/
|
||||||
COPY scripts/avahi_startup.sh avahi_startup.sh
|
COPY scripts/avahi_startup.sh avahi_startup.sh
|
||||||
COPY scripts/iobroker_startup.sh iobroker_startup.sh
|
COPY scripts/iobroker_startup.sh iobroker_startup.sh
|
||||||
|
COPY scripts/packages_install.sh packages_install.sh
|
||||||
RUN chmod +x avahi_startup.sh \
|
RUN chmod +x avahi_startup.sh \
|
||||||
&& chmod +x iobroker_startup.sh
|
&& chmod +x iobroker_startup.sh \
|
||||||
|
&& chmod +x packages_install.sh
|
||||||
|
|
||||||
# Install ioBroker
|
# Install ioBroker
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
echo 'Checking avahi-daemon installation state...'
|
echo 'Checking avahi-daemon installation state...'
|
||||||
|
|
||||||
if [ -f /usr/sbin/avahi-daemon ]
|
if [ -f /usr/sbin/avahi-daemon ]
|
||||||
then
|
then
|
||||||
echo "Avahi already installed..."
|
echo 'Avahi already installed...'
|
||||||
else
|
else
|
||||||
echo "Installing avahi-daemon..."
|
echo 'Installing avahi-daemon...'
|
||||||
apt-get update && apt-get install -y libavahi-compat-libdnssd-dev avahi-daemon && rm -rf /var/lib/apt/lists/*
|
apt-get update && apt-get install -y libavahi-compat-libdnssd-dev avahi-daemon && rm -rf /var/lib/apt/lists/*
|
||||||
echo "Configuring avahi-daemon..."
|
echo 'Configuring avahi-daemon...'
|
||||||
sed -i '/^rlimit-nproc/s/^\(.*\)/#\1/g' /etc/avahi/avahi-daemon.conf
|
sed -i '/^rlimit-nproc/s/^\(.*\)/#\1/g' /etc/avahi/avahi-daemon.conf
|
||||||
echo "Configuring dbus..."
|
echo 'Configuring dbus...'
|
||||||
mkdir /var/run/dbus/
|
mkdir /var/run/dbus/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -19,12 +19,17 @@ then
|
|||||||
rm -f /var/run/dbus/pid
|
rm -f /var/run/dbus/pid
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /var/run/avahi-daemon//pid ];
|
||||||
|
then
|
||||||
|
rm -f /var/run/avahi-daemon//pid
|
||||||
|
fi
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
echo 'Starting dbus...'
|
echo 'Starting dbus...'
|
||||||
dbus-daemon --system
|
dbus-daemon --system
|
||||||
|
|
||||||
echo 'Restarting avahi-daemon...'
|
echo 'Starting avahi-daemon...'
|
||||||
/etc/init.d/avahi-daemon stop
|
|
||||||
sleep 1
|
|
||||||
/etc/init.d/avahi-daemon start
|
/etc/init.d/avahi-daemon start
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -7,6 +7,14 @@ avahi=$AVAHI
|
|||||||
echo 'ENV packages:' $packages
|
echo 'ENV packages:' $packages
|
||||||
echo 'ENV avahi:' $avahi
|
echo 'ENV avahi:' $avahi
|
||||||
|
|
||||||
|
if [ "$packages" != "" ]
|
||||||
|
then
|
||||||
|
echo 'Installing additional packages...'
|
||||||
|
echo 'The following packages will be installed:' $packages
|
||||||
|
sudo sh /opt/scripts/packages_install.sh # >/opt/scripts/packages_install.log 2>&1 &
|
||||||
|
echo 'Installing additional packages done...'
|
||||||
|
fi
|
||||||
|
|
||||||
cd /opt/iobroker
|
cd /opt/iobroker
|
||||||
|
|
||||||
echo 'Startupscript running...'
|
echo 'Startupscript running...'
|
||||||
@@ -38,7 +46,7 @@ fi
|
|||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
echo 'Starting ioBroker...'
|
echo 'Starting ioBroker...'
|
||||||
node node_modules/iobroker.js-controller/controller.js >/opt/scripts/docker_iobroker_log.txt 2>&1 &
|
node node_modules/iobroker.js-controller/controller.js >/opt/scripts/docker_iobroker.log 2>&1 &
|
||||||
echo 'Starting ioBroker done...'
|
echo 'Starting ioBroker done...'
|
||||||
|
|
||||||
tail -f /dev/null
|
tail -f /dev/null
|
||||||
|
|||||||
8
scripts/packages_install.sh
Normal file
8
scripts/packages_install.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
packages=$PACKAGES
|
||||||
|
echo 'ENV packages:' $packages
|
||||||
|
|
||||||
|
apt-get update && apt-get install -y $packages && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
exit 0
|
||||||
Reference in New Issue
Block a user