github.com/rentongzhang/docker@v1.8.2-rc1/daemon/execdriver/windows/checkoptions.go (about) 1 // +build windows 2 3 package windows 4 5 import ( 6 "errors" 7 8 "github.com/docker/docker/daemon/execdriver" 9 ) 10 11 func checkSupportedOptions(c *execdriver.Command) error { 12 // Windows doesn't support read-only root filesystem 13 if c.ReadonlyRootfs { 14 return errors.New("Windows does not support the read-only root filesystem option") 15 } 16 17 // Windows doesn't support username 18 if c.ProcessConfig.User != "" { 19 return errors.New("Windows does not support the username option") 20 } 21 22 // Windows doesn't support custom lxc options 23 if c.LxcConfig != nil { 24 return errors.New("Windows does not support lxc options") 25 } 26 27 // Windows doesn't support ulimit 28 if c.Resources.Rlimits != nil { 29 return errors.New("Windows does not support ulimit options") 30 } 31 32 // TODO Windows: Validate other fields which Windows doesn't support, factor 33 // out where applicable per platform. 34 35 return nil 36 }