Skip to content

Commit

Permalink
Ensure docker in workspace works with fuse
Browse files Browse the repository at this point in the history
  • Loading branch information
Furisto authored and roboquat committed Feb 14, 2022
1 parent c4b0983 commit 4af0e0d
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions components/workspacekit/cmd/rings.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ var ring1Cmd = &cobra.Command{
procLoc := filepath.Join(ring2Root, "proc")
err = os.MkdirAll(procLoc, 0755)
if err != nil {
log.WithError(err).Error("cannot mount proc")
log.WithError(err).Error("cannot create directory for mounting proc")
return
}

Expand Down Expand Up @@ -829,20 +829,6 @@ func pivotRoot(rootfs string, fsshift api.FSShiftMethod) error {
// with pivot_root this allows us to pivot without creating directories in
// the rootfs. Shout-outs to the LXC developers for giving us this idea.

if fsshift == api.FSShiftMethod_FUSE {
err := unix.Chroot(rootfs)
if err != nil {
return xerrors.Errorf("cannot chroot: %v", err)
}

err = unix.Chdir("/")
if err != nil {
return xerrors.Errorf("cannot chdir to new root :%v", err)
}

return nil
}

oldroot, err := unix.Open("/", unix.O_DIRECTORY|unix.O_RDONLY, 0)
if err != nil {
return err
Expand Down

0 comments on commit 4af0e0d

Please sign in to comment.