mirror of
https://github.com/containers/podman.git
synced 2025-10-18 19:53:58 +08:00
Merge commit from fork
[v5.5] machine init: fix tls check
This commit is contained in:
@ -224,7 +224,7 @@ func (o *OCIArtifactDisk) getDestArtifact() (types.ImageReference, digest.Digest
|
|||||||
}
|
}
|
||||||
fmt.Printf("Looking up Podman Machine image at %s to create VM\n", imgRef.DockerReference())
|
fmt.Printf("Looking up Podman Machine image at %s to create VM\n", imgRef.DockerReference())
|
||||||
sysCtx := &types.SystemContext{
|
sysCtx := &types.SystemContext{
|
||||||
DockerInsecureSkipTLSVerify: types.NewOptionalBool(!o.pullOptions.TLSVerify),
|
DockerInsecureSkipTLSVerify: o.pullOptions.SkipTLSVerify,
|
||||||
}
|
}
|
||||||
imgSrc, err := imgRef.NewImageSource(o.ctx, sysCtx)
|
imgSrc, err := imgRef.NewImageSource(o.ctx, sysCtx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -21,8 +21,8 @@ import (
|
|||||||
// PullOptions includes data to alter certain knobs when pulling a source
|
// PullOptions includes data to alter certain knobs when pulling a source
|
||||||
// image.
|
// image.
|
||||||
type PullOptions struct {
|
type PullOptions struct {
|
||||||
// Require HTTPS and verify certificates when accessing the registry.
|
// Skip TLS verification when accessing the registry.
|
||||||
TLSVerify bool
|
SkipTLSVerify types.OptionalBool
|
||||||
// [username[:password] to use when connecting to the registry.
|
// [username[:password] to use when connecting to the registry.
|
||||||
Credentials string
|
Credentials string
|
||||||
// Quiet the progress bars when pushing.
|
// Quiet the progress bars when pushing.
|
||||||
@ -46,7 +46,7 @@ func Pull(ctx context.Context, imageInput types.ImageReference, localDestPath *d
|
|||||||
}
|
}
|
||||||
|
|
||||||
sysCtx := &types.SystemContext{
|
sysCtx := &types.SystemContext{
|
||||||
DockerInsecureSkipTLSVerify: types.NewOptionalBool(!options.TLSVerify),
|
DockerInsecureSkipTLSVerify: options.SkipTLSVerify,
|
||||||
}
|
}
|
||||||
if options.Credentials != "" {
|
if options.Credentials != "" {
|
||||||
authConf, err := parse.AuthConfig(options.Credentials)
|
authConf, err := parse.AuthConfig(options.Credentials)
|
||||||
|
Reference in New Issue
Block a user