mirror of
https://github.com/containers/podman.git
synced 2025-11-29 01:28:22 +08:00
Use machine image as specified in containers.conf
For podman machine init, deprecate the --image-path option for --image. --image now accepts the correct image from containers.conf Also, add the ability to specify an OCI image from the --image flag using the docker:// transport. Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
@@ -15,8 +15,8 @@ func GetDisk(userInputPath string, dirs *define.MachineDirs, imagePath *define.V
|
||||
mydisk ocipull.Disker
|
||||
)
|
||||
|
||||
if userInputPath == "" {
|
||||
mydisk, err = ocipull.NewOCIArtifactPull(context.Background(), dirs, name, vmType, imagePath)
|
||||
if userInputPath == "" || strings.HasPrefix(userInputPath, "docker://") {
|
||||
mydisk, err = ocipull.NewOCIArtifactPull(context.Background(), dirs, userInputPath, name, vmType, imagePath)
|
||||
} else {
|
||||
if strings.HasPrefix(userInputPath, "http") {
|
||||
// TODO probably should use tempdir instead of datadir
|
||||
|
||||
Reference in New Issue
Block a user