Merge pull request #21602 from baude/ociartdisk

Allow podman machine to download from oci registry
This commit is contained in:
openshift-merge-bot[bot]
2024-02-13 12:51:28 +00:00
committed by GitHub
12 changed files with 471 additions and 237 deletions

View File

@ -16,7 +16,7 @@ func GetDisk(userInputPath string, dirs *define.MachineDirs, imagePath *define.V
)
if userInputPath == "" {
mydisk, err = ocipull.NewVersioned(context.Background(), dirs.DataDir, name, vmType.String(), imagePath)
mydisk, err = ocipull.NewOCIArtifactPull(context.Background(), dirs, name, vmType, imagePath)
} else {
if strings.HasPrefix(userInputPath, "http") {
// TODO probably should use tempdir instead of datadir

View File

@ -135,9 +135,7 @@ func Init(opts machineDefine.InitOptions, mp vmconfigs.VMProvider) (*vmconfigs.M
// "/path
// "docker://quay.io/something/someManifest
// TODO Ideally this changes into some way better ...
err = mp.GetDisk(opts.ImagePath, dirs, mc)
if err != nil {
if err := mp.GetDisk(opts.ImagePath, dirs, mc); err != nil {
return nil, err
}