2020年11月20日

摘要: 换成 docker export $(docker create busybox) | tar -C rootfs -xvf - 之前移植了 filesystem/initrd,用的 busybox 是 v1.25.0,但运行一个最简单的 Hello world 程序都提示 -/bin/sh: ./ 阅读全文
posted @ 2020-11-20 16:35 tycoon3 阅读(324) 评论(0) 推荐(0)
摘要: UNIX socket that spans two different mount namespaces The “init” process can establish a communication channel between the parent namespace and the ch 阅读全文
posted @ 2020-11-20 16:32 tycoon3 阅读(558) 评论(0) 推荐(0)
摘要: func RecvFd(socket *os.File) (*os.File, error) { // For some reason, unix.Recvmsg uses the length rather than the capacity // when passing the msg_con 阅读全文
posted @ 2020-11-20 15:37 tycoon3 阅读(570) 评论(0) 推荐(0)
摘要: 挂载proc文件系统 前文中已经提到,如果你在新的PID namespace中使用ps命令查看,看到的还是所有的进程,因为与PID直接相关的/proc文件系统(procfs)没有挂载到与原/proc不同的位置。所以如果你只想看到PID namespace本身应该看到的进程,需要重新挂载/proc,命 阅读全文
posted @ 2020-11-20 14:50 tycoon3 阅读(201) 评论(0) 推荐(0)
摘要: nsenter https://www.cnblogs.com/sparkdev/p/9400673.html 与 namespace 相关的工具 unshare 命令unshare 命令把当前进程加入到一个新建的 namespace 中,然后运行指定的程序(不指定目标程序则运行系统的默认 shel 阅读全文
posted @ 2020-11-20 14:47 tycoon3 阅读(301) 评论(0) 推荐(0)

导航