From 5994dee9a8b3b1ee97f9e3b3529fd32ffb896187 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Tue, 16 Sep 2014 13:15:48 -0400 Subject: Initial Commit. Sharing is caring --- roles/docker/files/enter-container.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 roles/docker/files/enter-container.sh (limited to 'roles/docker/files') 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) " + echo + exit 1 +fi + +PID=$(docker inspect --format '{{.State.Pid}}' $1) + +nsenter --target $PID --mount --uts --ipc --net --pid -- cgit v1.2.3