config_windows.go 556 B

123456789101112131415161718
  1. package registry
  2. import (
  3. "os"
  4. "path/filepath"
  5. "strings"
  6. )
  7. // CertsDir is the directory where certificates are stored
  8. var CertsDir = os.Getenv("programdata") + `\docker\certs.d`
  9. // cleanPath is used to ensure that a directory name is valid on the target
  10. // platform. It will be passed in something *similar* to a URL such as
  11. // https:\index.docker.io\v1. Not all platforms support directory names
  12. // which contain those characters (such as : on Windows)
  13. func cleanPath(s string) string {
  14. return filepath.FromSlash(strings.Replace(s, ":", "", -1))
  15. }