imageutils

package
v0.0.0-...-55114bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package imageutils contains helpers and utilities for managing and pulling images.

Index

Constants

This section is empty.

Variables

View Source
var ImageDir = filepath.Join(utils.GetOciSysextHome(), "images")

ImageDir is the default location for downloaded images.

Functions

func GetID

func GetID(image string) string

GetID returns the md5sum based ID for given image. If a recognized ID is passed, it is returned.

func GetPath

func GetPath(name string) string

GetPath returns the path for given image name or id.

func Inspect

func Inspect(images []string, format string) (string, error)

Inspect will return a JSON or a formatted string describing the input images.

func Pull

func Pull(image string, quiet bool) (string, error)

Pull will pull a given image and save it to ImageDir. This function uses github.com/google/go-containerregistry/pkg/crane to pull the image's manifest, and performs the downloading of each layer separately. Each layer is deduplicated between images in order to save space, using hardlinks. If quiet is specified, no output nor progress will be shown.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL