github.com/devdivbcp/moby@v17.12.0-ce-rc1.0.20200726071732-2d4bfdc789ad+incompatible/pkg/chrootarchive/chroot_unix.go (about) 1 // +build !windows,!linux 2 3 package chrootarchive // import "github.com/docker/docker/pkg/chrootarchive" 4 5 import "golang.org/x/sys/unix" 6 7 func chroot(path string) error { 8 if err := unix.Chroot(path); err != nil { 9 return err 10 } 11 return unix.Chdir("/") 12 } 13 14 func realChroot(path string) error { 15 return chroot(path) 16 }