nsenter工具进入Docker容器操作

 

wget https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.gz

tar  -zxvf  util-linux-2.24.tar.gz  && cd util-linux-2.24/

./configure  --without-ncurses

make nsenter

cp nsenter /usr/local/bin

 

查看容器的名称

docker ps

查看容器的PID

# docker inspect -f {{.State.Pid}} oracle11g_EDDI
1074750

使用nsenter命令进入该容器的网络命令空间

nsenter   -n -t1074750

 

posted @ 2022-04-29 13:55  beawh  阅读(146)  评论(0)    收藏  举报