]> www.vanbest.org Git - motioneye-debian/commitdiff
update motion repository to motion-project. bugfixes.
authorConor Heine <conor.heine@gmail.com>
Sun, 5 Mar 2017 19:43:29 +0000 (11:43 -0800)
committerConor Heine <conor.heine@gmail.com>
Sun, 5 Mar 2017 20:18:16 +0000 (12:18 -0800)
extra/Dockerfile
extra/Dockerfile.local [new file with mode: 0644]
extra/docker-compose.yml

index 7c65094f19bdacf206d0d6c39b9825c4e4b89d3c..6c11a6d10f3434e415d23ed30fd8f5244f65cf33 100644 (file)
@@ -3,10 +3,13 @@ FROM ubuntu:15.04
 MAINTAINER Conor Heine <conor.heine@gmail.com>
 
 ENV DEBIAN_FRONTEND noninteractive
-ENV export LANGUAGE=en_US.UTF-8
-ENV export LC_ALL=en_US.UTF-8
-ENV export LANG=en_US.UTF-8
-ENV export LC_TYPE=en_US.UTF-8
+
+RUN locale-gen en_US.UTF-8
+ENV LANGUAGE en_US.UTF-8
+ENV LC_ALL en_US.UTF-8
+ENV LANG en_US.UTF-8
+ENV LC_TYPE en_US.UTF-8
+ENV TZ America/Los_Angeles
 
 RUN apt-get update && \
     apt-get --yes install \
@@ -34,26 +37,17 @@ RUN apt-get update && \
 # Pip
 RUN pip install tornado jinja2 pillow pycurl
 
-RUN cd /tmp && \
-    git clone https://github.com/Mr-Dave/motion.git motion-mrdave && \
-    cd /tmp/motion-mrdave && \
+RUN cd /tmp && git clone --branch 4.0 https://github.com/Motion-Project/motion.git motion-project
+RUN cd /tmp/motion-project && \
     autoreconf -fiv && \
-    ./configure --prefix=/usr --without-pgsql --without-sdl --without-sqlite3 --without-mysql && \
+    ./configure --prefix=/usr --without-pgsql --without-sqlite3 --without-mysql --with-ffmpeg=/usr && \
     make && \
     touch README \
     make install && \
-    cp motion /usr/local/bin/motion && \
-    rm -rf /tmp/motion-mrdave
-
-COPY . /tmp/motioneye
+    cp motion /usr/local/bin/motion && cd / && \
+    rm -rf /tmp/motion-project
 
-RUN cd /tmp/motioneye && \
-    python setup.py install && \
-    mkdir /etc/motioneye && \
-    mkdir -p /var/lib/motioneye && \
-    mkdir -p /usr/share/motioneye/extra && \
-    cp /tmp/motioneye/extra/motioneye.conf.sample /usr/share/motioneye/extra/motioneye.conf.sample && \
-    rm -rf /tmp/motioneye
+RUN pip install motioneye
 
 # R/W needed for motioneye to update configurations
 VOLUME /etc/motioneye
diff --git a/extra/Dockerfile.local b/extra/Dockerfile.local
new file mode 100644 (file)
index 0000000..61218f1
--- /dev/null
@@ -0,0 +1,75 @@
+
+FROM ubuntu:15.04
+MAINTAINER Conor Heine <conor.heine@gmail.com>
+
+ENV DEBIAN_FRONTEND noninteractive
+
+RUN locale-gen en_US.UTF-8
+ENV LANGUAGE en_US.UTF-8
+ENV LC_ALL en_US.UTF-8
+ENV LANG en_US.UTF-8
+ENV LC_TYPE en_US.UTF-8
+ENV TZ America/Los_Angeles
+
+RUN apt-get update && \
+    apt-get --yes install \
+       automake \
+       autoconf \
+       build-essential \
+       ffmpeg \
+       git \
+       libav-tools \
+       libavcodec-dev \
+       libavformat-dev \
+       libavutil-dev \
+       libcurl4-openssl-dev \
+       libjpeg-dev \
+       libssl-dev \
+       libswscale-dev \
+       pkgconf \
+        python-dev \
+        python-pip \
+       python-setuptools \
+       subversion \
+       v4l-utils && \
+    apt-get clean
+
+# Pip
+RUN pip install tornado jinja2 pillow pycurl
+
+# Install motion
+RUN cd /tmp && git clone --branch 4.0 https://github.com/Motion-Project/motion.git motion-project
+RUN cd /tmp/motion-project && \
+    autoreconf -fiv && \
+    ./configure --prefix=/usr --without-pgsql --without-sqlite3 --without-mysql --with-ffmpeg=/usr && \
+    make && \
+    touch README \
+    make install && \
+    cp motion /usr/local/bin/motion && cd / && \
+    rm -rf /tmp/motion-project
+
+# Install motioneye from local source
+COPY . /tmp/motioneye
+RUN cd /tmp/motioneye && \
+    python setup.py install && \
+    mkdir /etc/motioneye && \
+    mkdir -p /var/lib/motioneye && \
+    mkdir -p /usr/share/motioneye/extra && \
+    cp /tmp/motioneye/extra/motioneye.conf.sample /usr/share/motioneye/extra/motioneye.conf.sample && \
+    rm -rf /tmp/motioneye
+
+# R/W needed for motioneye to update configurations
+VOLUME /etc/motioneye
+
+# PIDs
+VOLUME /var/run/motion
+
+# Video & images
+VOLUME /var/lib/motioneye
+
+CMD test -e /etc/motioneye/motioneye.conf || \    
+    cp /usr/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf ; \
+    /usr/local/bin/meyectl startserver -c /etc/motioneye/motioneye.conf
+
+EXPOSE 8765
+
index 226fb04c907f704d507e45b3a44dc14c0d94a507..a762c4d475de93571d8b8ce4480871d7db8cde57 100644 (file)
@@ -1,11 +1,17 @@
-motioneye:
-  image: motioneye
-  volumes:
-    - /mnt/motioneye/media:/media
-    - /mnt/motioneye/config:/etc/motioneye
-  environment:
-    - "TZ=Pacific/Auckland" # See http://php.net/manual/en/timezones.php
-  ports:
-    - 8081:8081
-    - 8765:8765
-  restart: always
+---
+version: "2"
+services:
+  motioneye:
+    image: cahna/motioneye
+    ports:
+      - "8081:8081"
+      - "8765:8765"
+    volumes_from:
+      - data_motioneye
+
+  data_motioneye:
+    image: busybox
+    volumes:
+      - /docker/motioneye/etc:/etc/motioneye
+      - /docker/motioneye/media:/var/lib/motioneye
+