* Allow bower install of frontend components as root. Needed for frontend development in docker since everything runs as root in the docker image. * Improve development workflow in docker * Use LANG=C.UTF-8 in tox. Fixes installation of libraries with UTF-8 in it's readme. * Install mysqlclient psycopg2 uvloop after requirements_all.txt again, but with a --no-cache-dir this time. Allows bootstrap_frontend to be executed in a different path like the other scripts.
32 lines
659 B
Bash
Executable file
32 lines
659 B
Bash
Executable file
#!/bin/sh
|
|
# Build and run Home Assinstant in Docker.
|
|
|
|
# Optional: pass in a timezone as first argument
|
|
# If not given will attempt to mount /etc/localtime
|
|
|
|
# Stop on errors
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
docker build -t home-assistant-dev -f virtualization/Docker/Dockerfile.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
|