Documentation ¶
Index ¶
- Constants
- func Get(ctx context.Context, ref string) (v1.Image, error)
- func NewLayer(ctx context.Context, fs fullfs.FullFS, platform *v1.Platform) (v1.Layer, error)
- func NormaliseImage(ctx context.Context, base v1.Image) (v1.Image, error)
- func Pull(ctx context.Context, ref string) (v1.Image, error)
- func Push(ctx context.Context, img v1.Image, dst string) error
- func Save(ctx context.Context, img v1.Image, dst, path string) error
- type Image
- type ImageOption
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 NormaliseImage ¶ added in v0.3.2
NormaliseImage mutates the provided v1.Image to be OCI compliant v1.Image.
Check image-spec to see which properties are ported and which are dropped. https://github.com/opencontainers/image-spec/blob/main/config.md
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func NewImage ¶
func NewImage(opts ...ImageOption) *Image
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
Click to show internal directories.
Click to hide internal directories.