1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:15 +02:00
dockerfiles/zoneminder/Dockerfile

35 lines
1.1 KiB
Docker
Raw Permalink Normal View History

2016-07-05 12:37:51 +02:00
#
# Dockerfile for zoneminder
#
FROM debian:jessie
2017-05-08 01:05:07 +02:00
MAINTAINER kev <noreply@easypi.pro>
2016-07-05 12:37:51 +02:00
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 \
2016-07-19 01:34:26 +02:00
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo 'FCGI_CHILDREN=4' > /etc/default/fcgiwrap
2016-07-05 12:37:51 +02:00
COPY nginx.conf /etc/nginx/sites-available/default
EXPOSE 80
CMD set -xe \
2016-07-18 07:02:30 +02:00
&& mkdir -p /var/run/zm \
&& chown www-data:www-data /var/run/zm \
2016-07-05 12:37:51 +02:00
&& /etc/init.d/fcgiwrap start \
&& /etc/init.d/php5-fpm start \
&& nginx -g 'daemon off;'