Windows: Unify OCI user struct

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2016-09-14 11:46:18 -07:00
parent 9e9ba1e1c1
commit 93f61b85eb
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.