diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2015-03-22 22:11:22 -0400 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2015-03-24 11:26:30 -0700 |
commit | 8f35aff7245246de4116fcf3c81e7f095cf1be3a (patch) | |
tree | 93e01df486d75d9d2d7fd072d830fbb36218bff4 /roles/os_env_extras_node/files/enter-container.sh | |
parent | 14b19e665b118349327a5c8c219cc49c96ae1d52 (diff) | |
download | openshift-8f35aff7245246de4116fcf3c81e7f095cf1be3a.tar.gz openshift-8f35aff7245246de4116fcf3c81e7f095cf1be3a.tar.bz2 openshift-8f35aff7245246de4116fcf3c81e7f095cf1be3a.tar.xz openshift-8f35aff7245246de4116fcf3c81e7f095cf1be3a.zip |
Add new role os_env_extras_node that is a subset of the docker role
- Does not install or start docker, since the openshift-node role will handle
that for us
- Only add root to the dockerroot group and configures the enter-container
script.
Diffstat (limited to 'roles/os_env_extras_node/files/enter-container.sh')
-rwxr-xr-x | roles/os_env_extras_node/files/enter-container.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/os_env_extras_node/files/enter-container.sh b/roles/os_env_extras_node/files/enter-container.sh new file mode 100755 index 000000000..7cf5b8d83 --- /dev/null +++ b/roles/os_env_extras_node/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 |