From 64c8357b6ef6a84bf778c5ddc17b45a93dae6dc9 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Tue, 15 Nov 2016 01:03:10 +0000 Subject: [PATCH] Add Makefile and docker-compose.yaml --- Makefile | 27 +++++++++++++++++++++++++++ docker-compose.yaml | 11 +++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Makefile create mode 100644 docker-compose.yaml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..53d5def --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +default: build + +# Default target to build the image +build: + docker build -t rpi-motioneye-dev . + +# Target to build and run and subsequently remove image +run: build + docker run --rm \ + -p "localhost:8765:8765" + -v "recordings:/var/lib/motioneye" \ + rpi-motioneye-dev + +# Target to drop into an interractive shell +shell: build + docker run --rm \ + -p "localhost:8765:8765" + -v "recordings:/var/lib/motioneye" \ + -it rpi-motioneye-dev bash + +# Tags dev image so it can be pushed +tag: build + docker tag rpi-motioneye-dev vividboarder/rpi-motioneye + +# Pushes tagged image to docker hub +push: tag + docker push vividboarder/rpi-motioneye diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..58fc7cd --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,11 @@ +version: '2' +services: + motioneye: + build: . + container_name: motioneye + ports: + - "8765:8765" + volumes: + - recordings:/var/lib/motioneye +volumes: + recordings: {}