mirror of
https://github.com/containers/podman.git
synced 2025-11-02 23:39:52 +08:00
Merge pull request #21602 from baude/ociartdisk
Allow podman machine to download from oci registry
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user