1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00

add zoneminder

This commit is contained in:
kev 2016-07-05 18:37:51 +08:00
parent 7bded15bc5
commit fa0cb1351a
7 changed files with 1285 additions and 0 deletions

@ -42,6 +42,7 @@ A collection of delicious docker recipes.
- [ ] tshark
- [ ] youtube-upload
- [ ] xl2tpd
- [ ] zoneminder
## Daemon

31
zoneminder/Dockerfile Normal file

@ -0,0 +1,31 @@
#
# Dockerfile for zoneminder
#
FROM debian:jessie
MAINTAINER kev <noreply@easypi.info>
RUN set -xe \
&& echo 'deb http://http.debian.net/debian jessie-backports main' >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install --no-install-recommends -y fcgiwrap \
ffmpeg \
nginx \
php5-fpm \
zoneminder \
&& rm -rf /var/lib/apt/lists/*
RUN set -xe \
&& chmod o+r /etc/zm/zm.conf \
&& sed -i 's@^ZM_DB_HOST=.*$@ZM_DB_HOST=mysql@' /etc/zm/zm.conf \
&& sed -i 's@^;date.timezone =.*$@date.timezone = Asia/Shanghai@' /etc/php5/*/php.ini \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY nginx.conf /etc/nginx/sites-available/default
EXPOSE 80
CMD set -xe \
&& /etc/init.d/fcgiwrap start \
&& /etc/init.d/php5-fpm start \
&& nginx -g 'daemon off;'

36
zoneminder/README.md Normal file

@ -0,0 +1,36 @@
zoneminder
==========
![](https://badge.imagelayers.io/vimagick/zoneminder:latest.svg)
[ZoneMinder][1] is a full-featured, open source, state-of-the-art video
surveillance software system. Monitor your home, office, or wherever you want.
Using off the shelf hardware with any camera, you can design a system as large
or as small as you need.
## docker-compose.yml
```yaml
zoneminder:
image: vimagick/zoneminder
ports:
- "8080:80"
links:
- mysql
restart: always
mysql:
image: mysql
volumes:
- ./sql:/docker-entrypoint-initdb.d
environment:
- MYSQL_ROOT_PASSWORD=root
restart: always
```
## references
- <https://wiki.zoneminder.com/Ubuntu_Server_16.04_64-bit_with_Zoneminder_1.29.0_the_easy_way>
- <https://chiralsoftware.com/content/zoneminder-nginx-yes-it-works>
[1]: https://www.zoneminder.com/

@ -0,0 +1,15 @@
zoneminder:
image: vimagick/zoneminder
ports:
- "8080:80"
links:
- mysql
restart: always
mysql:
image: mysql
volumes:
- ./sql:/docker-entrypoint-initdb.d
environment:
- MYSQL_ROOT_PASSWORD=root
restart: always

24
zoneminder/nginx.conf Normal file

@ -0,0 +1,24 @@
server {
listen 80 default_server;
server_name _;
index index.php;
location /zm/ {
alias /usr/share/zoneminder/www/;
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
location /zm/cgi-bin/ {
alias /usr/lib/zoneminder/cgi-bin/;
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
GRANT ALL ON zm.* TO 'zmuser'@% IDENTIFIED BY 'zmpass';