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:
Jason T. Greene
2022-03-24 22:07:55 -05:00
parent 3b6ffcd290
commit b0d36f6351
11 changed files with 273 additions and 13 deletions

View 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
}