Skip to content

Commit

Permalink
Revert "Set bind propagation to shared by default"
Browse files Browse the repository at this point in the history
This reverts commit 76b16a9.
  • Loading branch information
sprat committed Nov 12, 2024
1 parent 76b16a9 commit 2b1cbce
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions builder/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ func relocateRootFS() error {
return err
}

// set bind propagation to "shared"
if err := unix.Mount("", newRoot, "", unix.MS_SHARED, ""); err != nil {
return err
}

// copy all the files to the new root
options := copy.Options{
Skip: func(srcinfo os.FileInfo, src, dest string) (bool, error) { // skip the new root directory
Expand Down Expand Up @@ -81,7 +76,6 @@ func main() {

// Some programs (e.g. runc) refuse to work if the rootfs is a tmpfs or ramfs.
// So, we need to copy all the files into a new tmpfs and make it the new rootfs.
// We also set the bind propagation to shared since it can be useful to run containers.
if sfs.Type == ramfsMagic || sfs.Type == tmpfsMagic {
if err := relocateRootFS(); err != nil {
log.Fatalf("Cannot relocate rootfs: %v", err)
Expand Down

0 comments on commit 2b1cbce

Please sign in to comment.