github.com/containerd/nerdctl@v1.7.7/pkg/defaults/defaults_windows.go (about) 1 /* 2 Copyright The containerd Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package defaults 18 19 import ( 20 "fmt" 21 "os" 22 "path/filepath" 23 ) 24 25 const ( 26 AppArmorProfileName = "" 27 SeccompProfileName = "" 28 Runtime = "io.containerd.runhcs.v1" 29 ) 30 31 func DataRoot() string { 32 return filepath.Join(os.Getenv("ProgramData"), "nerdctl") 33 } 34 35 func CNIPath() string { 36 return filepath.Join(os.Getenv("ProgramFiles"), "containerd", "cni", "bin") 37 } 38 39 func CNINetConfPath() string { 40 return filepath.Join(os.Getenv("ProgramFiles"), "containerd", "cni", "conf") 41 } 42 43 func CNIRuntimeDir() string { 44 return "" 45 } 46 47 func BuildKitHost() string { 48 return fmt.Sprint("\\\\.\\pipe\\buildkit") 49 } 50 51 func IsSystemdAvailable() bool { 52 return false 53 } 54 55 func CgroupManager() string { 56 return "" 57 } 58 59 func CgroupnsMode() string { 60 return "" 61 } 62 63 func NerdctlTOML() string { 64 ucd, err := os.UserConfigDir() 65 if err != nil { 66 panic(err) 67 } 68 return filepath.Join(ucd, "nerdctl\\nerdctl.toml") 69 } 70 71 func HostsDirs() []string { 72 programData := os.Getenv("ProgramData") 73 if programData == "" { 74 panic("%ProgramData% needs to be set") 75 } 76 return []string{ 77 filepath.Join(programData, "containerd\\certs.d"), 78 filepath.Join(programData, "docker\\certs.d"), 79 } 80 } 81 82 func HostGatewayIP() string { 83 return "" 84 }