-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code-4.1 syscall.PivotRoot error: invalid argument #62
Comments
pivotRoot 方法前面添加 下面代码 // systemd 加入linux之后, mount namespace 就变成 shared by default, 所以你必须显示
//声明你要这个新的mount namespace独立。
err = syscall.Mount("", "/", "", syscall.MS_PRIVATE|syscall.MS_REC, "") |
同样是pivot_root这里,我加入了这个方法之后,在busybox中,所有的mount点和PID都没有了 报错的代码是这里: |
同时,如果我在进入busybox容器中后,使用命令 |
@Joey777210 是的,我也同样遇到这个问题了,请问你最后解决了没有?我一直就卡在这了 |
|
@hxia043 |
root@Ss-PC:/home/song12300560/gopath/src/github.com/xianlubird/mydocker# ./mydocker run -ti sh {"level":"info","msg":"command all is sh","time":"2019-11-14T19:29:59+08:00"} {"level":"info","msg":"init come on","time":"2019-11-14T19:29:59+08:00"} {"level":"info","msg":"Current location is /root/busybox","time":"2019-11-14T19:29:59+08:00"} {"level":"info","msg":"syscall.PivotRoot(/root/busybox, /root/busybox/.pivot_root)","time":"2019-11-14T19:29:59+08:00"} {"level":"fatal","msg":"pivotRoot error: pivot_root invalid argument","time":"2019-11-14T19:29:59+08:00"} root@Ss-PC:/home/song12300560/gopath/src/github.com/xianlubird/mydocker#
输出如上面所示,源码code-4.1
The text was updated successfully, but these errors were encountered: