mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Implements Windows volume/mount support
Based on WSL2 9p support: remaps windows paths to /mnt/<drive> locations for both podman and Docker API clients. Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
This commit is contained in:
24
pkg/specgen/winpath_linux.go
Normal file
24
pkg/specgen/winpath_linux.go
Normal file
@ -0,0 +1,24 @@
|
||||
package specgen
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/containers/common/pkg/machine"
|
||||
)
|
||||
|
||||
func shouldResolveWinPaths() bool {
|
||||
return machine.MachineHostType() == "wsl"
|
||||
}
|
||||
|
||||
func shouldResolveUnixWinVariant(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
return err != nil
|
||||
}
|
||||
|
||||
func resolveRelativeOnWindows(path string) string {
|
||||
return path
|
||||
}
|
||||
|
||||
func winPathExists(path string) bool {
|
||||
return false
|
||||
}
|
Reference in New Issue
Block a user