Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultLayerFormat will push layers to a registry as-is. DefaultLayerFormat = "" // SquashfsLayerFormat will push layers to a registry as squashfs only. An // image containing layers with another mediaType will not be pushed. SquashfsLayerFormat = "squashfs" // TarLayerFormat will push layers to a registry as tar only, for // compatibility with other runtimes. Any squashfs layers will be converted // to tar automatically. An image containing layers with another mediaType // will not be pushed. TarLayerFormat = "tar" )
Variables ¶
This section is empty.
Functions ¶
func PullOCISIF ¶
func PullOCISIF(ctx context.Context, imgCache *cache.Handle, directTo, pullFrom string, opts PullOptions) (imagePath string, err error)
PullOCISIF will create an OCI-SIF image in the cache if directTo="", or a specific file if directTo is set.
func PushOCISIF ¶
func PushOCISIF(ctx context.Context, sourceFile, destRef string, opts PushOptions) error
PushOCISIF pushes a single image from sourceFile to the OCI registry destRef.
Types ¶
type PullOptions ¶
type PushOptions ¶ added in v4.2.0
type PushOptions struct {
// Auth provides optional explicit credentials for OCI registry authentication.
Auth *authn.AuthConfig
// AuthFile provides a path to a file containing OCI registry credentials.
AuthFile string
// LayerFormat sets an explicit layer format to use when pushing an OCI
// image. See xxxLayerFormat constants.
LayerFormat string
// TmpDir is a temporary directory to be used for an temporary files created
// during the push.
TmpDir string
// WithCosign controls whether cosign signatures present in the SIF are also
// pushed to the destination repository in the registry.
WithCosign bool
}
PushOptions provides options/configuration that determine the behavior of a push to an OCI registry.
Click to show internal directories.
Click to hide internal directories.