2014-01-25 00:03:02 +08:00
|
|
|
# ZoneMinder
|
|
|
|
|
2014-01-27 22:39:59 +08:00
|
|
|
FROM ubuntu:precise
|
2014-01-25 00:03:02 +08:00
|
|
|
MAINTAINER Kyle Johnson <kjohnson@gnulnx.net>
|
|
|
|
|
2014-01-25 02:49:27 +08:00
|
|
|
# Let the conatiner know that there is no tty
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
2014-01-25 00:03:02 +08:00
|
|
|
# Resynchronize the package index files
|
2014-01-25 03:13:45 +08:00
|
|
|
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
|
2014-01-25 00:03:02 +08:00
|
|
|
RUN apt-get update
|
|
|
|
|
2014-01-25 08:43:08 +08:00
|
|
|
# Install the prerequisites
|
2014-03-15 00:24:12 +08:00
|
|
|
RUN apt-get install -y build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm subversion automake autoconf libjpeg-turbo8-dev libjpeg-turbo8 libtheora-dev libvorbis-dev libvpx-dev libx264-dev libmp4v2-dev ffmpeg git wget mysql-client apache2 php5 php5-mysql apache2-mpm-prefork libapache2-mod-php5 php5-cli openssh-server mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore5 vlc-data vlc libcurl4-openssl-dev
|
2014-01-25 00:03:02 +08:00
|
|
|
|
2014-03-15 00:02:37 +08:00
|
|
|
# Grab the latest ZoneMinder code in master
|
|
|
|
RUN git clone https://github.com/kylejohnson/ZoneMinder.git
|
2014-01-25 00:03:02 +08:00
|
|
|
|
|
|
|
# Change into the ZoneMinder directory
|
|
|
|
WORKDIR ZoneMinder
|
|
|
|
|
2014-03-15 00:02:37 +08:00
|
|
|
# Check out the release-1.27 branch
|
|
|
|
RUN git checkout release-1.27
|
|
|
|
|
2014-01-25 08:43:08 +08:00
|
|
|
# Setup the ZoneMinder build environment
|
|
|
|
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
|
2014-01-27 22:39:59 +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 ZM_SSL_LIB=openssl ZM_DB_USER=zm ZM_DB_PASS=zm
|
2014-01-25 00:03:02 +08:00
|
|
|
|
|
|
|
# Build ZoneMinder
|
|
|
|
RUN make
|
|
|
|
|
|
|
|
# Install ZoneMinder
|
|
|
|
RUN make install
|
|
|
|
|
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
|
|
|
|
2014-01-27 22:39:59 +08:00
|
|
|
# Make start script executable
|
|
|
|
RUN chmod 755 /tmp/start.sh
|
2014-01-25 00:03:02 +08:00
|
|
|
|
2014-01-28 03:03:51 +08:00
|
|
|
# Set the root passwd
|
|
|
|
RUN echo 'root:root' | chpasswd
|
|
|
|
|
2014-01-27 22:39:59 +08:00
|
|
|
# Expose ssh and http ports
|
|
|
|
EXPOSE 80
|
|
|
|
EXPOSE 22
|
2014-01-25 00:03:02 +08:00
|
|
|
|
|
|
|
|
2014-01-27 22:39:59 +08:00
|
|
|
CMD "/tmp/start.sh"
|