Vendor in latest containers/common

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2024-02-27 16:20:50 -05:00
parent 98d1ad5a22
commit 2c9c7273ca
19 changed files with 365 additions and 90 deletions

View File

@@ -1,6 +1,13 @@
package config
import "os"
import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/containers/storage/pkg/homedir"
)
// isCgroup2UnifiedMode returns whether we are running in cgroup2 mode.
func isCgroup2UnifiedMode() (isUnified bool, isUnifiedErr error) {
@@ -36,7 +43,10 @@ func getLibpodTmpDir() string {
// getDefaultMachineVolumes returns default mounted volumes (possibly with env vars, which will be expanded)
func getDefaultMachineVolumes() []string {
return []string{}
hd := homedir.Get()
vol := filepath.VolumeName(hd)
hostMnt := filepath.ToSlash(strings.TrimPrefix(hd, vol))
return []string{fmt.Sprintf("%s:%s", hd, hostMnt)}
}
func getDefaultComposeProviders() []string {