mirror of https://github.com/Nardo86/zm-docker.git
Timezone issue resolved, split versions 1.34
This commit is contained in:
parent
f98b59c46e
commit
c9f3cf9aff
11
Dockerfile
11
Dockerfile
|
@ -17,15 +17,16 @@ RUN apt-get install -y \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
gnupg \
|
gnupg \
|
||||||
wget \
|
wget \
|
||||||
&& wget -O - https://zmrepo.zoneminder.com/debian/archive-keyring.gpg | apt-key add - \
|
msmtp \
|
||||||
|
msmtp-mta
|
||||||
|
|
||||||
|
RUN wget -O - https://zmrepo.zoneminder.com/debian/archive-keyring.gpg | apt-key add - \
|
||||||
&& echo 'deb https://zmrepo.zoneminder.com/debian/release-1.34 buster/' >> /etc/apt/sources.list
|
&& echo 'deb https://zmrepo.zoneminder.com/debian/release-1.34 buster/' >> /etc/apt/sources.list
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
||||||
RUN apt-get install -y \
|
RUN apt-get install -y \
|
||||||
zoneminder \
|
zoneminder
|
||||||
msmtp \
|
|
||||||
msmtp-mta
|
|
||||||
|
|
||||||
RUN adduser www-data video
|
RUN adduser www-data video
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ RUN a2enmod ssl \
|
||||||
RUN mkdir /config
|
RUN mkdir /config
|
||||||
|
|
||||||
COPY entrypoint.sh /
|
COPY entrypoint.sh /
|
||||||
run chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
|
|
13
README.md
13
README.md
|
@ -1,12 +1,12 @@
|
||||||
# ZONEMINDER
|
# ZONEMINDER 1.34
|
||||||
|
|
||||||
This is a simple debian image with the ZoneMinder installed following the official instructions https://wiki.zoneminder.com/Debian_10_Buster_with_Zoneminder_1.34.x_from_ZM_Repo.
|
This is a simple debian image with the ZoneMinder 1.34 installed following the official instructions https://wiki.zoneminder.com/Debian_10_Buster_with_Zoneminder_1.34.x_from_ZM_Repo.
|
||||||
|
|
||||||
Because of the ssmtp deprecation the mail server installed is msmtp and a default configuration file prepared for GMail will be created in /config/msmtprc.
|
Because of the ssmtp deprecation the mail server installed is msmtp and a default configuration file prepared for GMail will be created in /config/msmtprc.
|
||||||
|
|
||||||
Furthermore the image is prepared for working with SWAG(let's encrypt) image or there is an environment for the self-signed certificate option.
|
Furthermore the image is prepared for working with SWAG(let's encrypt) image or there is an environment for the self-signed certificate option.
|
||||||
|
|
||||||
Image available at https://hub.docker.com/r/nardo86/zoneminder
|
Image available at https://hub.docker.com/r/nardo86/zoneminder with tag 1.34
|
||||||
|
|
||||||
Feel free to consider donating if my work helped you! https://paypal.me/ErosNardi
|
Feel free to consider donating if my work helped you! https://paypal.me/ErosNardi
|
||||||
|
|
||||||
|
@ -41,11 +41,12 @@ Just run the image publishing the port and setting the ENV variables, the shm de
|
||||||
|
|
||||||
` --restart unless-stopped \`
|
` --restart unless-stopped \`
|
||||||
|
|
||||||
` nardo86/zoneminder`
|
` nardo86/zoneminder:1.34`
|
||||||
|
|
||||||
The SELFSIGNED flag will , the FQDN will be used for configuring Apache2 and, in case of using the SWAG certificate, find the correct folder and the /config folder will contain msmtp and mysql configuration.
|
The FQDN will be used for configuring Apache2; the SELFSIGNED flag will generate a selfsigned certificate if needed else, in case of using the SWAG certificate, the system find the correct folder.
|
||||||
|
The /config folder will contain msmtp and mysql configuration.
|
||||||
|
|
||||||
The shm-size will be the quantity of RAM dedicated to /dev/shm.*
|
The shm-size will be the quantity of RAM dedicated to /dev/shm, the size depends on the number and settings of the video sources to monitor, check ZoneMinder configuration for further information.*
|
||||||
|
|
||||||
**be sure to not reserve too much RAM to this machine or the docker server wil start to paging and eventually becoming unresponsible**
|
**be sure to not reserve too much RAM to this machine or the docker server wil start to paging and eventually becoming unresponsible**
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo $TZ > /etc/timezone
|
#echo $TZ > /etc/timezone
|
||||||
|
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
echo "Configuring MariaDBPath"
|
echo "Configuring MariaDBPath"
|
||||||
if [ ! -d /config/mysql ]; then
|
if [ ! -d /config/mysql ]; then
|
||||||
|
@ -54,7 +55,7 @@ fi
|
||||||
|
|
||||||
echo "Checking Timezones"
|
echo "Checking Timezones"
|
||||||
RESULT=$(cat /etc/mysql/my.cnf| grep default-time-zone)
|
RESULT=$(cat /etc/mysql/my.cnf| grep default-time-zone)
|
||||||
if [ "$RESULT" = "" ]; then
|
if [ "$RESULT" != "default-time-zone=$(cat /etc/timezone)" ]; then
|
||||||
echo "Set Mysql timezone"
|
echo "Set Mysql timezone"
|
||||||
printf "[mysqld]\n default-time-zone=$(cat /etc/timezone)" >> /etc/mysql/my.cnf
|
printf "[mysqld]\n default-time-zone=$(cat /etc/timezone)" >> /etc/mysql/my.cnf
|
||||||
/etc/init.d/mysql restart
|
/etc/init.d/mysql restart
|
||||||
|
@ -65,9 +66,9 @@ if [ "$RESULT" = "" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RESULT=$(cat /etc/php/*/apache2/php.ini| grep "date.timezone =")
|
RESULT=$(cat /etc/php/*/apache2/php.ini| grep "date.timezone =")
|
||||||
if [ "$RESULT" = ";date.timezone =" ]; then
|
if [ "$RESULT" != "date.timezone = $(sed 's/\\/\//' /etc/timezone)" ]; then
|
||||||
echo "Set Php timezone"
|
echo "Set Php timezone"
|
||||||
sed -i "s/;date.timezone =/date.timezone = $(sed 's/\//\\\//' /etc/timezone)/g" /etc/php/*/apache2/php.ini
|
sed -i "s/;date.timezone =/date.timezone = $(sed 's/\\/\//' /etc/timezone)/g" /etc/php/*/apache2/php.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Checking MSMTP configuration"
|
echo "Checking MSMTP configuration"
|
||||||
|
@ -92,7 +93,7 @@ ln -s /config/msmtprc /etc/msmtprc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$SELFSIGNED" = "0" ]; then
|
if [ "$SELFSIGNED" = "0" ]; then
|
||||||
echo "Configuro collegamento a swag"
|
echo "Linking to SWAG"
|
||||||
sed -i -e 's,/etc/ssl/certs/ssl-cert-snakeoil.pem,/sslcert/live/'$FQDN'/cert.pem,g' /etc/apache2/sites-available/default-ssl.conf
|
sed -i -e 's,/etc/ssl/certs/ssl-cert-snakeoil.pem,/sslcert/live/'$FQDN'/cert.pem,g' /etc/apache2/sites-available/default-ssl.conf
|
||||||
sed -i -e 's,/etc/ssl/private/ssl-cert-snakeoil.key,/sslcert/live/'$FQDN'/privkey.pem,g' /etc/apache2/sites-available/default-ssl.conf
|
sed -i -e 's,/etc/ssl/private/ssl-cert-snakeoil.key,/sslcert/live/'$FQDN'/privkey.pem,g' /etc/apache2/sites-available/default-ssl.conf
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue