Files
podman/vendor/go.podman.io/common/pkg/config/default_windows.go
Andrew Melnick feb36e4fe6 Implement TLS API Support
* Added flags to point to TLS PEM files to use for exposing and connecting
  to an encrypted remote API socket with server and client authentication.
* Added TLS fields for system connection ls templates.
* Added special "tls" format for system connection ls to list TLS fields
  in human-readable table format.
* Updated remote integration and system tests to allow specifying a
  "transport" to run the full suite against a unix, tcp, tls, or mtls
  system service.
* Added system tests to verify basic operation of unix, tcp, tls, and mtls
  services, clients, and connections.

Signed-off-by: Andrew Melnick <meln5674.5674@gmail.com>
2025-09-26 09:09:54 -06:00

52 lines
1.3 KiB
Go

package config
import (
"fmt"
"os"
"path/filepath"
"strings"
"go.podman.io/storage/pkg/homedir"
)
// getDefaultTmpDir for windows
func getDefaultTmpDir() string {
// first check the Temp env var
// https://answers.microsoft.com/en-us/windows/forum/all/where-is-the-temporary-folder/44a039a5-45ba-48dd-84db-fd700e54fd56
if val, ok := os.LookupEnv("TEMP"); ok {
return val
}
return os.Getenv("LOCALAPPDATA") + "\\Temp"
}
func getDefaultCgroupsMode() string {
return "enabled"
}
func getDefaultLockType() string {
return "shm"
}
func getLibpodTmpDir() string {
return "/run/libpod"
}
// getDefaultMachineVolumes returns default mounted volumes (possibly with env vars, which will be expanded)
// It is executed only if the machine provider is Hyper-V and it mimics WSL
// behavior where the host %USERPROFILE% drive (e.g. C:\) is automatically
// mounted in the guest under /mnt/ (e.g. /mnt/c/)
func getDefaultMachineVolumes() []string {
hd := homedir.Get()
vol := filepath.VolumeName(hd)
hostMnt := filepath.ToSlash(strings.TrimPrefix(hd, vol))
return []string{
fmt.Sprintf("%s:%s", hd, hostMnt),
fmt.Sprintf("%s:%s", vol+"\\", "/mnt/"+strings.ToLower(vol[0:1])),
}
}
func getDefaultComposeProviders() []string {
// Rely on os.LookPath to do the trick on Windows.
return []string{"docker-compose", "podman-compose"}
}