First pass for scripts to rule them all

This commit is contained in:
Paulus Schoutsen
2015-09-17 00:35:26 -07:00
parent 3947ed3c2b
commit 8c77418b6a
18 changed files with 52 additions and 44 deletions

28
script/dev_docker Executable file
View File

@@ -0,0 +1,28 @@
# Build and run Home Assinstant in Docker
# Optional: pass in a timezone as first argument
# If not given will attempt to mount /etc/localtime
cd "$(dirname "$0")/.."
docker build -t home-assistant-dev .
if [ $# -gt 0 ]
then
docker run \
--net=host \
--device=/dev/ttyUSB0:/zwaveusbstick:rwm \
-e "TZ=$1" \
-v `pwd`:/usr/src/app \
-v `pwd`/config:/config \
-t -i home-assistant-dev
else
docker run \
--net=host \
-v /etc/localtime:/etc/localtime:ro \
-v `pwd`:/usr/src/app \
-v `pwd`/config:/config \
-t -i home-assistant-dev
fi