Open san3Xian opened 4 years ago
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
give this script execute permission and add it to your PATH variable