Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/docker-run13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/docker-run b/scripts/docker-run
new file mode 100755
index 0000000..a11ce87
--- /dev/null
+++ b/scripts/docker-run
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+user_id=$(id -u)
+image=btroops
+
+if [[ $2 == run && $3 == test* ]]
+then
+ port=3005
+else
+ port=8080
+fi
+
+docker run --rm --init -it -v $PWD:/usr/src/app -u $user_id:$user_id -p $port:$port $image $@