gopkg.in/dotcloud/docker.v1@v1.13.1/daemon/workdir.go (about) 1 package daemon 2 3 // ContainerCreateWorkdir creates the working directory. This is solves the 4 // issue arising from https://github.com/docker/docker/issues/27545, 5 // which was initially fixed by https://github.com/docker/docker/pull/27884. But that fix 6 // was too expensive in terms of performance on Windows. Instead, 7 // https://github.com/docker/docker/pull/28514 introduces this new functionality 8 // where the builder calls into the backend here to create the working directory. 9 func (daemon *Daemon) ContainerCreateWorkdir(cID string) error { 10 container, err := daemon.GetContainer(cID) 11 if err != nil { 12 return err 13 } 14 err = daemon.Mount(container) 15 if err != nil { 16 return err 17 } 18 defer daemon.Unmount(container) 19 rootUID, rootGID := daemon.GetRemappedUIDGID() 20 return container.SetupWorkingDirectory(rootUID, rootGID) 21 }