Add dssh: get a login for a docker container
authorColin P. Mccabe <colin@cmccabe.xyz>
Tue, 29 Nov 2016 18:01:02 +0000 (10:01 -0800)
committerColin P. Mccabe <colin@cmccabe.xyz>
Tue, 29 Nov 2016 18:01:02 +0000 (10:01 -0800)
dssh [new file with mode: 0755]

diff --git a/dssh b/dssh
new file mode 100755 (executable)
index 0000000..c67976e
--- /dev/null
+++ b/dssh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+#
+# Get a login for a docker container.
+#
+
+die() {
+    echo $@
+    exit 1
+}
+
+CONTAINER=${1}
+[ "x${CONTAINER}" == "x" ] && die "You must supply a container name as the first argument."
+shift
+docker exec -it "${CONTAINER}" bash "${@}"