summaryrefslogtreecommitdiff
path: root/misc/vm
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2019-01-07 20:35:23 +0300
committerRasmus Andersson <rasmus@notion.se>2019-01-07 20:35:23 +0300
commitc134b24a0a80588cf1a05dc0ec21be029599fd11 (patch)
tree80a77786c607811a8eb4d1c40dd3bbc4a079593e /misc/vm
parentdfe6b939c719410b73aa965016173b50b5b55995 (diff)
downloadinter-c134b24a0a80588cf1a05dc0ec21be029599fd11.tar.xz
update docker build script and add convenience wrapper
Diffstat (limited to 'misc/vm')
-rwxr-xr-xmisc/vm19
1 files changed, 19 insertions, 0 deletions
diff --git a/misc/vm b/misc/vm
new file mode 100755
index 000000000..cea5e8687
--- /dev/null
+++ b/misc/vm
@@ -0,0 +1,19 @@
+#!/bin/bash -e
+#
+# Invokes provided arguments in a prebuilt docker image that contains
+# the Inter UI toolchain.
+#
+cd "$(dirname "$0")/.."
+
+RUN_ARGS=-it
+if [[ "$1" == "--no-tty" ]]; then
+ RUN_ARGS=-i
+ shift
+elif [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then
+ echo "Run Inter UI build environment virtual machine using docker." >&2
+ echo "usage: $0 [--no-tty] [<arg> ...]" >&2
+ echo "--no-tty Do not run with TTY input device emulation (useful for scripting)" >&2
+ exit 1
+fi
+
+docker run --rm $RUN_ARGS -v "$PWD:/host" rsms/inter-ui-build:latest "$@"