]> www.vanbest.org Git - motioneye-debian/commitdiff
Dockerfile for using motioneye from current Git checkout works.
authorMarcus Klein <himself@kleini.org>
Sun, 5 Nov 2017 19:02:11 +0000 (20:02 +0100)
committerMarcus Klein <himself@kleini.org>
Sun, 5 Nov 2017 19:02:11 +0000 (20:02 +0100)
Need to move some path specifications around for this.

.travis.yml
extra/Dockerfile
extra/Dockerfile.armv7-armhf
extra/Dockerfile.local

index 769546aa149b4612d30fcfc1cb24bfee4c6ce973..a6ef73ceb6df4861558e7a728e1462b4195fc7d6 100644 (file)
@@ -1,16 +1,11 @@
+dist: trusty
 sudo: required
+
 language: bash
+
 services:
   - docker
-before_install:
-  - docker info
-  - docker run --rm --privileged multiarch/qemu-user-static:register --reset
-install:
-  - docker build --build-arg VCS_REF=$TRAVIS_COMMIT --build-arg BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ") -t $DOCKER_REPO:$TRAVIS_BRANCH-$TARGET -f extra/Dockerfile${EXT} extra
-  - docker run --rm $DOCKER_REPO:$TRAVIS_BRANCH-$TARGET uname -a
-after_success:
-  - docker login -e=$DOCKER_EMAIL -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD
-  - docker push $DOCKER_REPO:$TRAVIS_BRANCH-$TARGET
+
 env:
   # global:
   #   DOCKER_REPO
@@ -22,3 +17,13 @@ env:
     - TARGET=armhf EXT=".armv7-armhf"
 matrix:
   fast_finish: true
+
+before_install:
+  - docker info
+  - docker run --rm --privileged multiarch/qemu-user-static:register --reset
+install:
+  - docker build --build-arg VCS_REF=$TRAVIS_COMMIT --build-arg BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ") -t $DOCKER_REPO:$TRAVIS_BRANCH-$TARGET -f extra/Dockerfile${EXT} .
+  - docker run --rm $DOCKER_REPO:$TRAVIS_BRANCH-$TARGET uname -a
+after_success:
+  - docker login -e=$DOCKER_EMAIL -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD
+  - docker push $DOCKER_REPO:$TRAVIS_BRANCH-$TARGET
index e48cd40e9d6ca2bbe894dcb7cac3e9a5fd34a2f0..e5b9e113fd89066e288d93e42db25ae86712fff9 100644 (file)
@@ -47,7 +47,7 @@ VOLUME /var/run/motion
 # Video & images
 VOLUME /var/lib/motioneye
 
-ADD motioneye.conf.sample /usr/share/motioneye/extra/
+ADD extra/motioneye.conf.sample /usr/share/motioneye/extra/
 
 CMD test -e /etc/motioneye/motioneye.conf || \    
     cp /usr/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf ; \
index fb711a6581f3277af69c27c013d6f899652a75c1..3aaf61e7afb792a58353906b85c1f6835b1eff30 100644 (file)
@@ -46,7 +46,7 @@ VOLUME /var/run/motion
 # Video & images
 VOLUME /var/lib/motioneye
 
-ADD motioneye.conf.sample /usr/share/motioneye/extra/
+ADD extra/motioneye.conf.sample /usr/share/motioneye/extra/
 
 CMD test -e /etc/motioneye/motioneye.conf || \    
     cp /usr/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf ; \
index 61218f19bec076917064fb71ea464d20aab920df..3da5c67a051a2ee501aeb96d869389bef8ba4662 100644 (file)
@@ -1,62 +1,46 @@
+FROM ubuntu:17.10
+LABEL maintainer="Marcus Klein <himself@kleini.org>"
+
+ARG BUILD_DATE
+ARG VCS_REF
+LABEL org.label-schema.build-date=$BUILD_DATE \
+    org.label-schema.docker.dockerfile="extra/Dockerfile" \
+    org.label-schema.license="GPLv3" \
+    org.label-schema.name="motioneye" \
+    org.label-schema.url="https://github.com/ccrisan/motioneye/wiki" \
+    org.label-schema.vcs-ref=$VCS_REF \
+    org.label-schema.vcs-type="Git" \
+    org.label-schema.vcs-url="https://github.com/ccrisan/motioneye.git"
 
-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
+
+RUN apt-get --quiet update && \
+    DEBIAN_FRONTEND="noninteractive" apt-get --quiet --yes --option Dpkg::Options::="--force-confnew" --no-install-recommends install \
+    curl \
+    ffmpeg \
+    libmysqlclient20 \
+    libpq5 \
+    lsb-release \
+    python-jinja2 \
+    python-pil \
+    python-pip \
+    python-pycurl \
+    python-setuptools \
+    python-tornado \
+    python-wheel \
+    v4l-utils && \
+    curl -L --output /tmp/motion.deb https://github.com/Motion-Project/motion/releases/download/release-4.0.1/yakkety_motion_4.0.1-1_amd64.deb && \
+    dpkg -i /tmp/motion.deb && \
+    rm /tmp/motion.deb && \
+    cd /tmp/motioneye && \
+    pip install /tmp/motioneye && \
+    rm -rf /tmp/motioneye && \ 
+    apt-get purge --yes \
+    python-pip \
+    python-setuptools \
+    python-wheel && \
+    apt-get --quiet autoremove --yes && \
+    apt-get --quiet --yes clean && rm -rf /var/lib/apt/lists/* && rm -f /var/cache/apt/*.bin
 
 # R/W needed for motioneye to update configurations
 VOLUME /etc/motioneye
@@ -67,9 +51,10 @@ VOLUME /var/run/motion
 # Video & images
 VOLUME /var/lib/motioneye
 
+ADD extra/motioneye.conf.sample /usr/share/motioneye/extra/
+
 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
-