Add Makefile and docker-compose.yaml

This commit is contained in:
ViViDboarder 2016-11-15 01:03:10 +00:00
parent 6fb8d75ed7
commit 64c8357b6e
2 changed files with 38 additions and 0 deletions

27
Makefile Normal file
View File

@ -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

11
docker-compose.yaml Normal file
View File

@ -0,0 +1,11 @@
version: '2'
services:
motioneye:
build: .
container_name: motioneye
ports:
- "8765:8765"
volumes:
- recordings:/var/lib/motioneye
volumes:
recordings: {}