1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2025-12-27 05:38:30 +00:00
Files
operating-system/scripts/enter.sh
Pascal Vizeli 9dca4fc837 Update enter.sh
2020-04-15 16:08:16 +02:00

13 lines
418 B
Bash
Executable File

#!/bin/bash
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
CACHE_DIR="${CACHE_DIR:-$HOME/hassos-cache}"
sudo mkdir -p "${CACHE_DIR}"
sudo chown -R "${BUILDER_UID}:${BUILDER_GID}" "${CACHE_DIR}"
sudo docker build -t hassos:local .
sudo docker run -it --rm --privileged \
-v "$(pwd):/build" -v "${CACHE_DIR}:/cache" \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
hassos:local bash