Merge pull request #26578 from Microsoft/jjh/ociuser
Windows: Unify OCI user struct
This commit is contained in:
commit
112ba3637d
2 changed files with 10 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue