containerutil

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/somebody/.local/bin"
View Source
const DefaultUsername = "somebody"
View Source
const MagicImageScratch = "scratch"

Variables

This section is empty.

Functions

func NewLayer

func NewLayer(ctx context.Context, fs fullfs.FullFS, platform *v1.Platform) (v1.Layer, error)

func Pull

func Pull(ctx context.Context, ref string) (v1.Image, error)

func Push

func Push(ctx context.Context, img v1.Image, dst string) error

func Save

func Save(ctx context.Context, img v1.Image, dst, path string) error

Types

type Image

type Image struct {
	// contains filtered or unexported fields
}

func NewImage

func NewImage(opts ...ImageOption) *Image

func (*Image) Append

func (ib *Image) Append(ctx context.Context, fs fs.FullFS, platform *v1.Platform) (v1.Image, error)

type ImageOption

type ImageOption func(image *Image)

func WithBaseImage

func WithBaseImage(img v1.Image) ImageOption

func WithEntrypoint

func WithEntrypoint(ep, cmd []string) ImageOption

func WithEnv

func WithEnv(env ...string) ImageOption

func WithUsername

func WithUsername(s string) ImageOption

Jump to

Keyboard shortcuts

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