ZoneMinder / zmdockerfiles

Dockerfiles for the ZoneMinder project build system and for running ZoneMinder
210 stars 105 forks source link

Warning on build from development ubuntu xenial #14

Closed zhuykovkb closed 6 years ago

zhuykovkb commented 6 years ago

Hi guys. I'm really wonder of what you doing. It's great!

I've found a warning on building the Dockerfile from latest Dockerfile. Here my output:

root@office:/home/system/docker/zmtest/docker# docker-compose build
Building zm
Step 1/18 : FROM ubuntu:xenial
 ---> b9e15a5d1e1a
Step 2/18 : MAINTAINER Markos Vakondios <mvakondios@gmail.com> Riley Schuit <riley.schuit@gmail.com>
 ---> Using cache
 ---> 03d071ab0ee4
Step 3/18 : RUN apt-get update     && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends     apache2     build-essential     cmake     dh-autoreconf     dpatch     git     libapache2-mod-php     libarchive-zip-perl     libavcodec-dev     libavdevice-dev     libavfilter-dev     libavformat-dev     libavresample-dev     libav-tools     libavutil-dev     libbz2-dev     libcurl4-gnutls-dev     libdate-manip-perl     libdbd-mysql-perl     libdbi-perl     libdevice-serialport-perl     libgcrypt-dev     libgnutls-openssl-dev     libjpeg-turbo8     libjpeg-turbo8-dev     libmime-lite-perl     libmime-perl     libmp4v2-dev     libmysqlclient-dev     libnet-sftp-foreign-perl     libnetpbm10-dev     libpcre3     libpcre3-dev     libpolkit-gobject-1-dev     libpostproc-dev     libssl-dev     libswscale-dev     libsys-cpu-perl     libsys-meminfo-perl     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-gd     php-mysql     ssmtp     software-properties-common     vlc-data     yasm     zip     && add-apt-repository -y ppa:iconnor/zoneminder     && apt-get update     && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends     php-apcu-bc     && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 6e6e1aa8fe0d
Step 4/18 : RUN git clone --recursive https://github.com/ZoneMinder/ZoneMinder
 ---> Using cache
 ---> fbd2d2b9eedc
Step 5/18 : WORKDIR /ZoneMinder
 ---> Using cache
 ---> 50d9ca9ed2ac
Step 6/18 : RUN cmake .
 ---> Using cache
 ---> 3868a89220bf
Step 7/18 : RUN make && make install
 ---> Using cache
 ---> 6cb6ee4525fa
Step 8/18 : RUN ./zmlinkcontent.sh
 ---> Using cache
 ---> ffcba2932520
Step 9/18 : VOLUME /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/mysql /var/log/zm
 ---> Using cache
 ---> bc0b644d3446
Step 10/18 : RUN service mysql stop && service apache2 stop
 ---> Using cache
 ---> 311e64a6b2e6
Step 11/18 : RUN cp misc/apache.conf /etc/apache2/sites-available/000-default.conf
 ---> Using cache
 ---> 5014c4fd1e80
Step 12/18 : RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf && a2enconf -q servername
 ---> Using cache
 ---> 15e215419814
Step 13/18 : RUN a2enmod -q cgi && a2enmod -q rewrite
 ---> Running in 9d4f29d9b409
AH00526: Syntax error on line 62 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Enabling module cgi.
Enabling module rewrite.
 ---> dce2c91fbb91
Removing intermediate container 9d4f29d9b409

to disable it we should invert cgi and rewrite options for a2enmod. I'll do a PR for this. Thank you. P.S. My docker-compose.yml:

root@office:/home/system/docker/zmtest/docker# cat docker-compose.yml   
version: '3'
services:
  zm:
    build: ./zm/image
    container_name: "${CONTAINER_NAME}"
    image: "${IMAGE_NAME}"
    shm_size: '8gb'
    env_file:
      - .env
    ports:
     - "127.0.0.1:82:80"
    volumes:
     - "${ZM_PATH_PREFIX}/events:/var/lib/zoneminder/events"
     - "${ZM_PATH_PREFIX}/images:/var/lib/zoneminder/images"
     - "${ZM_PATH_PREFIX}/mysql:/var/lib/mysql"
     - "${ZM_PATH_PREFIX}/logs:/var/log/zm"
     - "${ZM_PATH_PREFIX}/cache:/var/cache/zoneminder"

my .env file:

root@office:/home/system/docker/zmtest/docker# cat .env 
CONTAINER_NAME=zoneminder-git-test-dev
IMAGE_NAME=zoneminder-git-test-dev
TZ=Europe/Moscow
ZM_PATH_PREFIX=/zoneminder/dev
root@office:/home/system/docker/zmtest/docker# 
zhuykovkb commented 6 years ago

I've got a fix https://github.com/ZoneMinder/zmdockerfiles/pull/15

knight-of-ni commented 6 years ago

@zhuykovkb Thank you for reporting these issues. I just wanted to give you a heads up that we are knee deep in making one last push for a 1.32.1 release tomorrow. I will follow up with you after that. Thanks!

zhuykovkb commented 6 years ago

thank you for the latest update 5c6cf88d9304adc148fdd62e4a41deb4c99bc8bc. I build it on my system and it works =)

knight-of-ni commented 6 years ago

15 has been merged.

FYI, if you put the text fixes #XX in your PR, where XX is the github Issue number, then github will auto-close the associated issue when the PR is merged. :-)