code: func (daemon *Daemon) createSpecLinuxFields(c *container.Container, s *specs.Spec) error {
  	s.Root = &specs.Root{
  		Path:     "rootfs",
  		Readonly: c.HostConfig.ReadonlyRootfs,
  	}
  
  	s.Hostname = c.Config.Hostname
  	setLinuxDomainname(c, s)
  
  	if len(s.Process.Cwd) == 0 {
  		s.Process.Cwd = `/`
  	}
  	s.Process.Args = append([]string{c.Path}, c.Args...)
  
  	// Note these are against the UVM.
  	setResourcesInSpec(c, s, true) // LCOW is Hyper-V only
  
  	capabilities, err := caps.TweakCapabilities(oci.DefaultCapabilities(), c.HostConfig.CapAdd, c.HostConfig.CapDrop, c.HostConfig.Capabilities, c.HostConfig.Privileged)
  	if err != nil {
  		return fmt.Errorf("linux spec capabilities: %v", err)
  	}
  	if err := oci.SetCapabilities(s, capabilities); err != nil {
  		return fmt.Errorf("linux spec capabilities: %v", err)
  	}
  	devPermissions, err := oci.AppendDevicePermissionsFromCgroupRules(nil, c.HostConfig.DeviceCgroupRules)
  	if err != nil {
  		return fmt.Errorf("linux runtime spec devices: %v", err)
  	}
  	s.Linux.Resources.Devices = devPermissions
  	return nil
  }
docs: // Sets the Linux-specific fields of the OCI spec
  // TODO: @jhowardmsft LCOW Support. We need to do a lot more pulling in what can
  // be pulled in from oci_linux.go.