Merge pull request #26578 from Microsoft/jjh/ociuser

Windows: Unify OCI user struct
This commit is contained in:
Brian Goff 2016-09-18 09:20:45 -04:00 committed by GitHub
commit 112ba3637d
2 changed files with 10 additions and 3 deletions

View file

@ -72,7 +72,7 @@ func (daemon *Daemon) createSpec(c *container.Container) (*libcontainerd.Spec, e
s.Process.Env = c.CreateDaemonEnvironment(linkedEnv)
s.Process.InitialConsoleSize = c.HostConfig.ConsoleSize
s.Process.Terminal = c.Config.Tty
s.Process.User.User = c.Config.User
s.Process.User.Username = c.Config.User
// In spec.Root
s.Root.Path = c.BaseFS

View file

@ -66,9 +66,16 @@ type Process struct {
Cwd string `json:"cwd"`
}
// User contains the user information for Windows
// User specifies specific user (and group) information for the container process.
type User struct {
User string `json:"user,omitempty"`
// UID is the user id.
UID uint32 `json:"uid" platform:"linux,solaris"`
// GID is the group id.
GID uint32 `json:"gid" platform:"linux,solaris"`
// AdditionalGids are additional group ids set for the container's process.
AdditionalGids []uint32 `json:"additionalGids,omitempty" platform:"linux,solaris"`
// Username is the user name.
Username string `json:"username,omitempty" platform:"windows"`
}
// Root contains information about the container's root filesystem on the host.