mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 02:37:50 +00:00
Add a docker dev script
This commit is contained in:
parent
d81723c8fc
commit
6119e1e660
28
scripts/dev_docker
Executable file
28
scripts/dev_docker
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
# Optional: pass in a timezone as first argument
|
||||||
|
# If not given will attempt to mount /etc/localtime
|
||||||
|
|
||||||
|
# If current pwd is scripts, go 1 up.
|
||||||
|
if [ ${PWD##*/} == "scripts" ]; then
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build -t home-assistant-dev .
|
||||||
|
|
||||||
|
if [ $# -gt 0 ]
|
||||||
|
then
|
||||||
|
docker run \
|
||||||
|
--net=host \
|
||||||
|
-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
|
Loading…
x
Reference in New Issue
Block a user