Giter Club home page Giter Club logo

docker-zoneminder's Introduction

linuxserver.io

This is a Container in active development by the LinuxServer.io team and is not recommended for use by the general public.

If you want to comment\contribute on this container , are looking for support on any of our other work , or are curious about us in general, check out the following.

  • forum.linuxserver.io
  • IRC on freenode at #linuxserver.io
  • Podcast covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!

docker-zoneminder's People

Contributors

sparklyballs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-zoneminder's Issues

wrong timezone

I'm not able to connect to the web server.
There is all the time a error message.
ZoneMinder is not installed properly: php's date.timezone does not match the system timezone!

Cheers Robert

External db

allow to connect to external db by symbolic linking /etc/zm/conf.d/03-remote-mysql.conf to host conf

Contents of 03-remote-mysql.conf

# ZoneMinder database hostname or ip address and optionally port or unix socket
# Acceptable formats include hostname[:port], ip_address[:port], or localhost:unix_socket
ZM_DB_HOST=192.168.x.xxx:3306

# ZoneMinder database name
ZM_DB_NAME=zm

# ZoneMinder database user
ZM_DB_USER=zmuser

# ZoneMinder database password
ZM_DB_PASS=zmpass

# SSL CA certificate for ZoneMinder database
ZM_DB_SSL_CA_CERT=

# SSL client key for ZoneMinder database
ZM_DB_SSL_CLIENT_KEY=

# SSL client cert for ZoneMinder database
ZM_DB_SSL_CLIENT_CERT=

My compose:

zoneminder:
    image: linuxserver/zoneminder
    container_name: zoneminder
    restart: always
    environment:
      - PHP_TIMEZONE='America/New_York'
      - PGID=1000
      - PUID=1000
      - TZ=America/New_York
      - SHM_SIZE=1G
    ports:
      - 1080:80
    shm_size: 1G
    volumes:
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
      - /media/4TB/Dockers/zoneminder/events:/data/zoneminder/events
      - /media/4TB/Dockers/zoneminder/images:/data/zoneminder/images
      - /media/4TB/Dockers/zoneminder/exports:/data/zoneminder/exports
      - /media/4TB/Dockers/zoneminder/sounds:/data/zoneminder/sounds
      - /media/4TB/Dockers/zoneminder/logs:/config/log/zoneminder
      - /media/4TB/Dockers/zoneminder/fonts:/usr/share/webapps/zoneminder/htdocs/skins/classic/css/fonts
      - /media/4TB/Dockers/zoneminder/config/zm-config.conf:/etc/zm/conf.d/03-remote-mysql.conf
      - /media/4TB/Dockers/zoneminder/config/php-config.ini:/etc/php/7.0/apache2/conf.d/10-myconfig.ini

Note: I did have to manually create the db tables due to errors in the filters file. I can post the corrected db script if necessary.

Socket does not exist

When trying to view the stream I'm receiving an error:

Socket /var/run/zoneminder/zms-706932s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information.

I can't seem to be able to find the PATH_ZMS in the options, see screenshot options, there is no PATH tab.

image

Video recordings not displaying

Fix:
apt-get install php7.0-gd
Modify php.ini allow php_gd2

Accomplished php.ini edit by symbolic link to php-config.ini

; custom configuration for php
; priority=10
date.timezone = America/New_York
extension=php_gd2.dll

Then in settings:
disable random string appended for cache busting

My compose:

zoneminder:
    image: linuxserver/zoneminder
    container_name: zoneminder
    restart: always
    environment:
      - PHP_TIMEZONE='America/New_York'
      - PGID=1000
      - PUID=1000
      - TZ=America/New_York
      - SHM_SIZE=1G
    ports:
      - 1080:80
    shm_size: 1G
    volumes:
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
      - /media/4TB/Dockers/zoneminder/events:/data/zoneminder/events
      - /media/4TB/Dockers/zoneminder/images:/data/zoneminder/images
      - /media/4TB/Dockers/zoneminder/exports:/data/zoneminder/exports
      - /media/4TB/Dockers/zoneminder/sounds:/data/zoneminder/sounds
      - /media/4TB/Dockers/zoneminder/logs:/config/log/zoneminder
      - /media/4TB/Dockers/zoneminder/fonts:/usr/share/webapps/zoneminder/htdocs/skins/classic/css/fonts
      - /media/4TB/Dockers/zoneminder/config/zm-config.conf:/etc/zm/conf.d/03-remote-mysql.conf
      - /media/4TB/Dockers/zoneminder/config/php-config.ini:/etc/php/7.0/apache2/conf.d/10-myconfig.ini

Allow external DB

Any chances you could allow using a separate DB like you do for some of your other images like nextcloud? I use your nextcloud container too with your mariadb container for it's DB. Would be nice to have just one DB container running for both.

Thanks

Failed to link in web_php

I've been unable to identify this solution to this problem. Everything else working great due to previously posted issues with my workarounds.

Errors similar to these repeat over and over...
Failed linking skins/classic/js/classic.js to skins_classic_js_classic-classic-1525472290.js

Missing ZIP dependency

If I use the provided docker image I can not export a event as ZIP because the zip package is not installed. After the installation of zip I can create the export archive. Upstream reference: ZoneMinder/zoneminder#1974

(Event if I install zip I can not download that file but this should be another issue.)

Apache error log forwarding not working

The Apache error log is not forwarded to the docker log. Following error message from docker logs -f zoneminder_io:

tail: cannot open '1504187370.5762193240 /var/log/apache2/error.log' for reading: No such file or directory

It seems that the timestamp is also forwarded as argument to tail.

API returns 500 http response

I'm testing this new container and the API returns a 500 http response. From the logs I found this issue:

[Thu Aug 17 05:41:42.516197 2017] [:error] [pid 855] [client 172.17.0.1:59984] PHP Fatal error: Uncaught Error: Call to undefined function apc_fetch() in /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/Cache/Engine/ApcEngine.php:78
\nStack trace:\n#0 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/Cache/Cache.php(363): ApcEngine->read('myapp_cake_core...')\n#1 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/I18n/I18n.php(235): Cache::read('cake_dev_en', 'ca
ke_core
')\n#2 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/basics.php(636): I18n::translate('Cache engine "%...', NULL, 'cake_dev')\n#3 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/Cache/Cache.php(184): __d('cake_dev', 'Cac
he engine "%...', 'cake_core')\n#4 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('cake_core')\n#5 /usr/share/webapps/zoneminder/htdocs/api/app/Config/core.php(375): Cache::config('cak
e_core
', Array)\n#6 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/Core/Configure.php(72): include('/usr/share/weba...')\n#7 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/bootstrap.php(4 in /usr/share/webapps/zoneminder/htdocs
/api/lib/Cake/Cache/Engine/ApcEngine.php on line 78

The reason is because in PHP 7 doesn't have de backwards compatible apcu and apcu there for this needs to be installed:

apt-get install php-apcu
add to sources 'deb http://ftp.de.debian.org/debian sid main'
apt-get update, apt-get install php-apcu-bc

API not working and error in apache_error.log

linuxserver.io

having problem access the API and getting a cakephp error - aswell i see som weird errors on the logs.
the web gui is working fine, aswell the recording

lastest docker image from here, on ubuntu 17.10 docker-compose build --no-cache with the docker-compose file below
version: '3'

services:
  zoneminder:
    build: .
    container_name: zoneminder_ioserver
    restart: always
    ports:
      - 8000:80
    environment:
      - PGID=1001
      - PUID=1001
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/nico/docker/zoneminder_docker/config:/config
      - /mnt/qnap/CCTV:/data
    shm_size: 4096M

screenshot of the API interface
API cakePHP error

/docker/zoneminder_docker/config/log/zoneminder$ tail cake_error.log

#3 [internal function]: App::shutdown()
#4 {main}
2018-05-08 21:55:50 Error: Fatal Error (64): require_once() [<a href='http://php.net/function.require'>function.require</a>]: Failed opening required '../../../includes/config.php' (include_path='.:/usr/share/php') in [/usr/share/webapps/zoneminder/htdocs/api/app/Config/bootstrap.php, line 123]
2018-05-08 21:55:50 Error: [FatalErrorException] require_once() [<a href='http://php.net/function.require'>function.require</a>]: Failed opening required '../../../includes/config.php' (include_path='.:/usr/share/php')
Stack Trace:
#0 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/Error/ErrorHandler.php(212): ErrorHandler::handleFatalError(64, 'require_once() ...', '/usr/share/weba...', 123)
#1 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/Core/App.php(970): ErrorHandler::handleError(64, 'require_once() ...', '/usr/share/weba...', 123, Array)
#2 /usr/share/webapps/zoneminder/htdocs/api/lib/Cake/Core/App.php(943): App::_checkFatalError()
#3 [internal function]: App::shutdown()
#4 {main}

and from apache log

nico@hassio:~/docker/zoneminder_docker/config/log/zoneminder$ tail apache-error.log
[Tue May 08 22:15:33.945503 2018] [:error] [pid 334] [client 192.168.1.107:19268] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
[Tue May 08 22:16:35.051456 2018] [:error] [pid 329] [client 192.168.1.107:19278] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
[Tue May 08 22:16:35.052811 2018] [:error] [pid 329] [client 192.168.1.107:19278] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
[Tue May 08 22:16:35.053941 2018] [:error] [pid 329] [client 192.168.1.107:19278] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
[Tue May 08 22:16:35.055028 2018] [:error] [pid 329] [client 192.168.1.107:19278] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
[Tue May 08 22:16:35.056135 2018] [:error] [pid 329] [client 192.168.1.107:19278] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
[Tue May 08 22:16:35.057190 2018] [:error] [pid 329] [client 192.168.1.107:19278] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
[Tue May 08 22:16:35.058289 2018] [:error] [pid 329] [client 192.168.1.107:19278] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
[Tue May 08 22:16:35.059846 2018] [:error] [pid 329] [client 192.168.1.107:19278] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
[Tue May 08 22:16:35.060969 2018] [:error] [pid 329] [client 192.168.1.107:19278] PHP Warning:  symlink(): No such file or directory in /usr/share/webapps/zoneminder/htdocs/includes/functions.php on line 2056, referer: http://192.168.1.4:8000/index.php
im using nfs mount from the host OS to a NAS no symlinks used

first time creating a bug report, if you need more info, please let me know

Thanks, team linuxserver.io

Icons missing

Workaround:
fix icons by symbolic linking /usr/share/webapps/zoneminder/htdocs/skins/classic/css/fonts to host dir with fonts downloaded

Required fonts:
MaterialIcons-Regular.ttf
MaterialIcons-Regular.woff
MaterialIcons-Regular.woff2

My compose:

zoneminder:
    image: linuxserver/zoneminder
    container_name: zoneminder
    restart: always
    environment:
      - PHP_TIMEZONE='America/New_York'
      - PGID=1000
      - PUID=1000
      - TZ=America/New_York
      - SHM_SIZE=1G
    ports:
      - 1080:80
    shm_size: 1G
    volumes:
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
      - /media/4TB/Dockers/zoneminder/events:/data/zoneminder/events
      - /media/4TB/Dockers/zoneminder/images:/data/zoneminder/images
      - /media/4TB/Dockers/zoneminder/exports:/data/zoneminder/exports
      - /media/4TB/Dockers/zoneminder/sounds:/data/zoneminder/sounds
      - /media/4TB/Dockers/zoneminder/logs:/config/log/zoneminder
      - /media/4TB/Dockers/zoneminder/fonts:/usr/share/webapps/zoneminder/htdocs/skins/classic/css/fonts
      - /media/4TB/Dockers/zoneminder/config/zm-config.conf:/etc/zm/conf.d/03-remote-mysql.conf
      - /media/4TB/Dockers/zoneminder/config/php-config.ini:/etc/php/7.0/apache2/conf.d/10-myconfig.ini

Container Separation

Hi,

I was trying out Zoneminder for a personal project and noticed that most images are using the "everything in the same container" approach. I know there's a lot of scenarios where it does make sense but usually it is not a good practice.

Is there any plans to make individual containers for each service? Or at least an option to use an external database instead of running MySQL internally.

I don't know much about Zoneminder but I think maybe its possible to create individual containers for Apache, PHP, Zoneminder itself and MySQL.

Modularizing the components should make scaling much easier and even give some swapping capabilities in the future, like using Nginx instead of Apache.

Thanks for reading.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.