github.com/cookieai-jar/moby@v17.12.1-ce-rc2+incompatible/libcontainerd/utils_windows.go (about) 1 package libcontainerd 2 3 import ( 4 "strings" 5 6 "syscall" 7 8 opengcs "github.com/Microsoft/opengcs/client" 9 ) 10 11 // setupEnvironmentVariables converts a string array of environment variables 12 // into a map as required by the HCS. Source array is in format [v1=k1] [v2=k2] etc. 13 func setupEnvironmentVariables(a []string) map[string]string { 14 r := make(map[string]string) 15 for _, s := range a { 16 arr := strings.SplitN(s, "=", 2) 17 if len(arr) == 2 { 18 r[arr[0]] = arr[1] 19 } 20 } 21 return r 22 } 23 24 // Apply for the LCOW option is a no-op. 25 func (s *LCOWOption) Apply(interface{}) error { 26 return nil 27 } 28 29 // debugGCS is a dirty hack for debugging for Linux Utility VMs. It simply 30 // runs a bunch of commands inside the UVM, but seriously aides in advanced debugging. 31 func (c *container) debugGCS() { 32 if c == nil || c.isWindows || c.hcsContainer == nil { 33 return 34 } 35 cfg := opengcs.Config{ 36 Uvm: c.hcsContainer, 37 UvmTimeoutSeconds: 600, 38 } 39 cfg.DebugGCS() 40 } 41 42 // containerdSysProcAttr returns the SysProcAttr to use when exec'ing 43 // containerd 44 func containerdSysProcAttr() *syscall.SysProcAttr { 45 return nil 46 }