mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
Vendor in latest github.com/containers/storage,image, buildah
Grab latest fixes from subpackages Including fixes for usernamespace chowning retaining file attributes Better logging of error messages. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
33
vendor/github.com/containers/buildah/common.go
generated
vendored
33
vendor/github.com/containers/buildah/common.go
generated
vendored
@ -3,7 +3,10 @@ package buildah
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
cp "github.com/containers/image/copy"
|
||||
"github.com/containers/image/transports"
|
||||
"github.com/containers/image/types"
|
||||
)
|
||||
|
||||
@ -14,11 +17,35 @@ const (
|
||||
DOCKER = "docker"
|
||||
)
|
||||
|
||||
func getCopyOptions(reportWriter io.Writer, sourceSystemContext *types.SystemContext, destinationSystemContext *types.SystemContext, manifestType string) *cp.Options {
|
||||
func getCopyOptions(reportWriter io.Writer, sourceReference types.ImageReference, sourceSystemContext *types.SystemContext, destinationReference types.ImageReference, destinationSystemContext *types.SystemContext, manifestType string) *cp.Options {
|
||||
sourceCtx := &types.SystemContext{}
|
||||
if sourceSystemContext != nil {
|
||||
*sourceCtx = *sourceSystemContext
|
||||
}
|
||||
sourceInsecure, err := isReferenceInsecure(sourceReference, sourceCtx)
|
||||
if err != nil {
|
||||
logrus.Debugf("error determining if registry for %q is insecure: %v", transports.ImageName(sourceReference), err)
|
||||
} else if sourceInsecure {
|
||||
sourceCtx.DockerInsecureSkipTLSVerify = true
|
||||
sourceCtx.OCIInsecureSkipTLSVerify = true
|
||||
}
|
||||
|
||||
destinationCtx := &types.SystemContext{}
|
||||
if destinationSystemContext != nil {
|
||||
*destinationCtx = *destinationSystemContext
|
||||
}
|
||||
destinationInsecure, err := isReferenceInsecure(destinationReference, destinationCtx)
|
||||
if err != nil {
|
||||
logrus.Debugf("error determining if registry for %q is insecure: %v", transports.ImageName(destinationReference), err)
|
||||
} else if destinationInsecure {
|
||||
destinationCtx.DockerInsecureSkipTLSVerify = true
|
||||
destinationCtx.OCIInsecureSkipTLSVerify = true
|
||||
}
|
||||
|
||||
return &cp.Options{
|
||||
ReportWriter: reportWriter,
|
||||
SourceCtx: sourceSystemContext,
|
||||
DestinationCtx: destinationSystemContext,
|
||||
SourceCtx: sourceCtx,
|
||||
DestinationCtx: destinationCtx,
|
||||
ForceManifestMIMEType: manifestType,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user