+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
- 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
+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
# 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
-