projects
/
cmccabe-bin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
af60d2f
)
Add dssh: get a login for a docker container
author
Colin P. Mccabe
<colin@cmccabe.xyz>
Tue, 29 Nov 2016 18:01:02 +0000 (10:01 -0800)
committer
Colin P. Mccabe
<colin@cmccabe.xyz>
Tue, 29 Nov 2016 18:01:02 +0000 (10:01 -0800)
dssh
[new file with mode: 0755]
patch
|
blob
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 "${@}"