mirror of
https://github.com/mudler/luet.git
synced 2025-09-17 23:58:48 +00:00
Support mount with target folder in box exec
Also mount bind before pivotroot, this fixes bind mounting in general
This commit is contained in:
@@ -75,9 +75,9 @@ func mountProc(newroot string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func mountBind(hostfolder, newroot string) error {
|
||||
func mountBind(hostfolder, newroot, dst string) error {
|
||||
source := hostfolder
|
||||
target := filepath.Join(newroot, hostfolder)
|
||||
target := filepath.Join(newroot, dst)
|
||||
fstype := "bind"
|
||||
data := ""
|
||||
|
||||
@@ -90,5 +90,5 @@ func mountBind(hostfolder, newroot string) error {
|
||||
}
|
||||
|
||||
func mountDev(newroot string) error {
|
||||
return mountBind("/dev", newroot)
|
||||
return mountBind("/dev", newroot, "/dev")
|
||||
}
|
||||
|
Reference in New Issue
Block a user