2014-01-25 00:03:02 +08:00
|
|
|
# ZoneMinder
|
|
|
|
|
2016-02-01 19:39:43 +08:00
|
|
|
FROM ubuntu:trusty
|
2014-01-25 00:03:02 +08:00
|
|
|
MAINTAINER Kyle Johnson <kjohnson@gnulnx.net>
|
|
|
|
|
|
|
|
# Resynchronize the package index files
|
2016-06-02 08:51:41 +08:00
|
|
|
RUN apt-get update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
2014-10-11 14:29:46 +08:00
|
|
|
libpolkit-gobject-1-dev build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev \
|
|
|
|
libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 \
|
2016-02-05 21:02:20 +08:00
|
|
|
libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm cmake libjpeg-turbo8-dev \
|
2015-07-15 04:05:04 +08:00
|
|
|
libjpeg-turbo8 libtheora-dev libvorbis-dev libvpx-dev libx264-dev libmp4v2-dev libav-tools mysql-client \
|
2017-02-14 17:50:46 +08:00
|
|
|
apache2 php5 php5-mysql apache2-mpm-prefork libapache2-mod-php5 php5-cli \
|
2016-02-01 19:39:43 +08:00
|
|
|
mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore7 vlc-data libcurl4-openssl-dev \
|
2015-07-15 04:05:04 +08:00
|
|
|
libavformat-dev libswscale-dev libavutil-dev libavcodec-dev libavfilter-dev \
|
|
|
|
libavresample-dev libavdevice-dev libpostproc-dev libv4l-dev libtool libnetpbm10-dev \
|
2016-06-02 08:51:41 +08:00
|
|
|
libmime-lite-perl dh-autoreconf dpatch \
|
|
|
|
&& apt-get clean
|
2014-01-25 00:03:02 +08:00
|
|
|
|
2014-04-18 14:41:18 +08:00
|
|
|
# Copy local code into our container
|
|
|
|
ADD . /ZoneMinder
|
2014-01-25 00:03:02 +08:00
|
|
|
|
|
|
|
# Change into the ZoneMinder directory
|
2014-04-18 14:41:18 +08:00
|
|
|
WORKDIR /ZoneMinder
|
2014-03-15 00:02:37 +08:00
|
|
|
|
2014-01-25 08:43:08 +08:00
|
|
|
# Setup the ZoneMinder build environment
|
2016-02-05 21:02:20 +08:00
|
|
|
#RUN aclocal && autoheader && automake --force-missing --add-missing && autoconf
|
2014-01-25 00:03:02 +08:00
|
|
|
|
2014-01-25 08:43:08 +08:00
|
|
|
# Configure ZoneMinder
|
2016-02-05 21:02:20 +08: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-25 00:03:02 +08:00
|
|
|
|
2016-06-02 08:51:41 +08:00
|
|
|
# Build & install ZoneMinder
|
|
|
|
RUN make && make install
|
2014-01-25 00:03:02 +08:00
|
|
|
|
2016-02-05 21:02:20 +08:00
|
|
|
# ensure writable folders
|
|
|
|
RUN ./zmlinkcontent.sh
|
|
|
|
|
2014-01-27 22:39:59 +08:00
|
|
|
# Adding the start script
|
2014-01-28 03:03:51 +08:00
|
|
|
ADD utils/docker/start.sh /tmp/start.sh
|
2014-01-25 00:03:02 +08:00
|
|
|
|
2016-02-05 21:02:20 +08:00
|
|
|
# give files in /usr/local/share/zoneminder/
|
|
|
|
RUN chown -R www-data:www-data /usr/local/share/zoneminder/
|
|
|
|
|
2014-04-18 14:41:18 +08:00
|
|
|
# Adding apache virtual hosts file
|
2017-04-03 10:42:48 +08:00
|
|
|
RUN cp misc/apache.conf /etc/apache2/sites-available/000-default.conf
|
2016-02-01 19:39:43 +08:00
|
|
|
ADD utils/docker/phpdate.ini /etc/php5/apache2/conf.d/25-phpdate.ini
|
2014-04-18 14:41:18 +08:00
|
|
|
|
2017-02-14 17:50:46 +08:00
|
|
|
# Expose http ports
|
|
|
|
EXPOSE 80
|
2014-01-25 00:03:02 +08:00
|
|
|
|
2016-06-02 10:06:21 +08:00
|
|
|
# Initial database and apache setup:
|
|
|
|
RUN "/ZoneMinder/utils/docker/setup.sh"
|
|
|
|
|
|
|
|
CMD ["/ZoneMinder/utils/docker/start.sh"]
|
|
|
|
|