2017-06-07 00:22:37 +00:00
|
|
|
# ZoneMinder, you need the GIT repository code and submodules (git submodule update --init --recursive)
|
2014-01-24 16:03:02 +00:00
|
|
|
|
2017-02-17 21:34:17 +00:00
|
|
|
FROM ubuntu:xenial
|
|
|
|
MAINTAINER Markos Vakondios <mvakondios@gmail.com>
|
2014-01-24 16:03:02 +00:00
|
|
|
|
|
|
|
# Resynchronize the package index files
|
2017-06-07 00:22:37 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
|
|
apache2 \
|
|
|
|
build-essential \
|
|
|
|
cmake \
|
|
|
|
dh-autoreconf \
|
|
|
|
dpatch \
|
|
|
|
libapache2-mod-php \
|
|
|
|
libarchive-zip-perl \
|
|
|
|
libavcodec-dev \
|
|
|
|
libavdevice-dev \
|
|
|
|
libavfilter-dev \
|
|
|
|
libavformat-dev \
|
|
|
|
libavresample-dev \
|
|
|
|
libav-tools \
|
|
|
|
libavutil-dev \
|
|
|
|
libbz2-dev \
|
|
|
|
libcurl4-openssl-dev \
|
|
|
|
libdate-manip-perl \
|
|
|
|
libdbd-mysql-perl \
|
|
|
|
libdbi-perl \
|
|
|
|
libdevice-serialport-perl \
|
|
|
|
libjpeg-turbo8 \
|
|
|
|
libjpeg-turbo8-dev \
|
|
|
|
libmime-lite-perl \
|
|
|
|
libmime-perl \
|
|
|
|
libmp4v2-dev \
|
|
|
|
libmysqlclient-dev \
|
|
|
|
libnetpbm10-dev \
|
|
|
|
libpcre3 \
|
|
|
|
libpcre3-dev \
|
|
|
|
libpolkit-gobject-1-dev \
|
|
|
|
libpostproc-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libswscale-dev \
|
|
|
|
libsys-mmap-perl \
|
|
|
|
libtheora-dev \
|
|
|
|
libtool \
|
|
|
|
libv4l-dev \
|
|
|
|
libvlc5 \
|
|
|
|
libvlccore8 \
|
|
|
|
libvlccore-dev \
|
|
|
|
libvlc-dev \
|
|
|
|
libvorbis-dev \
|
|
|
|
libvpx-dev \
|
|
|
|
libwww-perl \
|
|
|
|
libx264-dev \
|
|
|
|
mysql-client \
|
|
|
|
mysql-server \
|
|
|
|
php \
|
|
|
|
php-cli \
|
|
|
|
php-mysql \
|
|
|
|
vlc-data \
|
|
|
|
yasm \
|
2017-08-26 15:16:17 +00:00
|
|
|
zip \
|
2017-06-07 00:22:37 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2014-01-24 16:03:02 +00:00
|
|
|
|
2014-04-18 06:41:18 +00:00
|
|
|
# Copy local code into our container
|
2017-06-07 00:22:37 +00:00
|
|
|
ADD cmake /ZoneMinder/cmake/
|
|
|
|
ADD db /ZoneMinder/db/
|
|
|
|
ADD misc /ZoneMinder/misc/
|
|
|
|
ADD onvif /ZoneMinder/onvif/
|
|
|
|
ADD scripts /ZoneMinder/scripts/
|
|
|
|
ADD src /ZoneMinder/src/
|
|
|
|
ADD umutils /ZoneMinder/umutils/
|
|
|
|
ADD web /ZoneMinder/web/
|
|
|
|
ADD cmakecacheimport.sh CMakeLists.txt version zm.conf.in zmconfgen.pl.in zmlinkcontent.sh.in zoneminder-config.cmake /ZoneMinder/
|
2017-06-11 17:07:28 +00:00
|
|
|
ADD conf.d /ZoneMinder/conf.d
|
2014-01-24 16:03:02 +00:00
|
|
|
|
|
|
|
# Change into the ZoneMinder directory
|
2014-04-18 06:41:18 +00:00
|
|
|
WORKDIR /ZoneMinder
|
2014-03-14 16:02:37 +00:00
|
|
|
|
2014-01-25 00:43:08 +00:00
|
|
|
# Setup the ZoneMinder build environment
|
2016-02-05 13:02:20 +00:00
|
|
|
#RUN aclocal && autoheader && automake --force-missing --add-missing && autoconf
|
2014-01-24 16:03:02 +00:00
|
|
|
|
2014-01-25 00:43:08 +00:00
|
|
|
# Configure ZoneMinder
|
2016-02-05 13:02:20 +00:00
|
|
|
#RUN ./configure --with-libarch=lib/$DEB_HOST_GNU_TYPE --disable-debug --host=$DEB_HOST_GNU_TYPE --build=$DEB_BUILD_GNU_TYPE --with-mysql=/usr --with-webdir=/var/www/zm --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-mmap=yes --enable-onvif ZM_SSL_LIB=openssl ZM_DB_USER=zm ZM_DB_PASS=zm
|
|
|
|
RUN cmake .
|
2014-01-24 16:03:02 +00:00
|
|
|
|
2016-06-02 00:51:41 +00:00
|
|
|
# Build & install ZoneMinder
|
|
|
|
RUN make && make install
|
2014-01-24 16:03:02 +00:00
|
|
|
|
2016-02-05 13:02:20 +00:00
|
|
|
# ensure writable folders
|
|
|
|
RUN ./zmlinkcontent.sh
|
|
|
|
|
2014-01-27 14:39:59 +00:00
|
|
|
# Adding the start script
|
2014-01-27 19:03:51 +00:00
|
|
|
ADD utils/docker/start.sh /tmp/start.sh
|
2014-01-24 16:03:02 +00:00
|
|
|
|
2017-06-07 00:22:37 +00:00
|
|
|
# Settings rights for /usr/local/share/zoneminder/
|
2016-02-05 13:02:20 +00:00
|
|
|
RUN chown -R www-data:www-data /usr/local/share/zoneminder/
|
|
|
|
|
2014-04-18 06:41:18 +00:00
|
|
|
# Adding apache virtual hosts file
|
2017-04-03 02:42:48 +00:00
|
|
|
RUN cp misc/apache.conf /etc/apache2/sites-available/000-default.conf
|
2017-02-17 21:34:17 +00:00
|
|
|
|
2017-02-17 22:17:18 +00:00
|
|
|
# Expose http port
|
|
|
|
EXPOSE 80
|
2014-01-24 16:03:02 +00:00
|
|
|
|
2017-06-07 00:22:37 +00:00
|
|
|
VOLUME /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/mysql /var/log/zm
|
2016-06-02 02:06:21 +00:00
|
|
|
|
2017-06-07 00:22:37 +00:00
|
|
|
# To speed up configuration testing, we put it here
|
|
|
|
ADD utils/docker /ZoneMinder/utils/docker/
|
2016-06-02 02:06:21 +00:00
|
|
|
|
2017-06-07 00:22:37 +00:00
|
|
|
CMD /ZoneMinder/utils/docker/setup.sh && /ZoneMinder/utils/docker/start.sh >/var/log/start.log 2>&1 & /bin/bash
|
|
|
|
|
|
|
|
# Run example docker run -it -p 1080:80 -e PHP_TIMEZONE='Europe/Paris' -v /disk/zoneminder/events:/var/lib/zoneminder/events -v /disk/zoneminder/images:/var/lib/zoneminder/images -v /disk/zoneminder/mysql:/var/lib/mysql -v /disk/zoneminder/logs:/var/log/zm --name zoneminder zoneminder/zoneminder
|