mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
Use pullOptions.systemContext in getDestArtifact
Right now, this correctly handles pullOptions.credentials which were ignored previously (admittedly that field is never set by anything...); in the future, it will ensure the two c/image users won't get out of sync again. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@@ -229,8 +229,9 @@ func (o *OCIArtifactDisk) getDestArtifact() (types.ImageReference, digest.Digest
|
||||
return nil, "", err
|
||||
}
|
||||
fmt.Printf("Looking up Podman Machine image at %s to create VM\n", imgRef.DockerReference())
|
||||
sysCtx := &types.SystemContext{
|
||||
DockerInsecureSkipTLSVerify: o.pullOptions.skipTLSVerify,
|
||||
sysCtx, err := o.pullOptions.systemContext()
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
imgSrc, err := imgRef.NewImageSource(o.ctx, sysCtx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user