-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
give this script execute permission and add it to your PATH variable
#!/bin/bash
############################################
#
# Author: WILO
# Todo: syntax check
# list docker containers and select
#
############################################
set -ex
pid=`docker inspect $1 | grep "Pid\"" | grep -oP "(\d)*" `
mkdir -p /var/run/netns
ln -sf /proc/$pid/ns/net /var/run/netns/$1
ip netns exec $@
rm /var/run/netns/$1
Reactions are currently unavailable