summaryrefslogtreecommitdiffstats
path: root/roles/docker/files
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2014-09-16 13:15:48 -0400
committerKenny Woodson <kwoodson@redhat.com>2014-09-16 13:15:48 -0400
commit5994dee9a8b3b1ee97f9e3b3529fd32ffb896187 (patch)
tree4c17abdd1e5b39e845d33d7d970ac216a82d766d /roles/docker/files
downloadopenshift-5994dee9a8b3b1ee97f9e3b3529fd32ffb896187.tar.gz
openshift-5994dee9a8b3b1ee97f9e3b3529fd32ffb896187.tar.bz2
openshift-5994dee9a8b3b1ee97f9e3b3529fd32ffb896187.tar.xz
openshift-5994dee9a8b3b1ee97f9e3b3529fd32ffb896187.zip
Initial Commit. Sharing is caring
Diffstat (limited to 'roles/docker/files')
-rwxr-xr-xroles/docker/files/enter-container.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/docker/files/enter-container.sh b/roles/docker/files/enter-container.sh
new file mode 100755
index 000000000..7cf5b8d83
--- /dev/null
+++ b/roles/docker/files/enter-container.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]
+then
+ echo
+ echo "Usage: $(basename $0) <container_name>"
+ echo
+ exit 1
+fi
+
+PID=$(docker inspect --format '{{.State.Pid}}' $1)
+
+nsenter --target $PID --mount --uts --ipc --net --pid