Files
homeassistant-core/script/dev_docker
T

33 lines
659 B
Bash
Raw Normal View History

#!/bin/sh
# Build and run Home Assinstant in Docker.
2015-02-17 00:56:35 -08:00
# Optional: pass in a timezone as first argument
# If not given will attempt to mount /etc/localtime
# Stop on errors
set -e
2015-09-17 00:35:26 -07:00
cd "$(dirname "$0")/.."
2015-02-17 00:56:35 -08:00
docker build -t home-assistant-dev -f virtualization/Docker/Dockerfile.dev .
2015-02-17 00:56:35 -08:00
if [ $# -gt 0 ]
then
docker run \
--net=host \
2015-02-21 23:21:44 -08:00
--device=/dev/ttyUSB0:/zwaveusbstick:rwm \
2015-02-17 00:56:35 -08:00
-e "TZ=$1" \
-v `pwd`:/usr/src/app \
-v `pwd`/config:/config \
-t -i home-assistant-dev
2015-02-17 00:56:35 -08:00
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