buildah

package
v1.14.1-0...-7f8ff72 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 81 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OCIArchive        string = "oci-archive"
	OCIManifestDir    string = "oci-dir"
	DockerArchive     string = "docker-archive"
	DockerManifestDir string = "docker-dir"
)
View Source
const (
	PullIfMissing = define.PullIfMissing
	PullAlways    = define.PullAlways
	PullIfNewer   = define.PullIfNewer
	PullNever     = define.PullNever
)
View Source
const (
	DisableAutoRootless = "DISABLE_AUTO_ROOTLESS"
)

Variables

View Source
var (
	TransportDir               = directory.Transport.Name()
	TransportDocker            = docker.Transport.Name()
	TransportDockerArchive     = archive.Transport.Name()
	TransportOCIArchive        = ociarchive.Transport.Name()
	TransportOCI               = layout.Transport.Name()
	TransportAtomic            = openshift.Transport.Name()
	TransportSif               = sif.Transport.Name()
	TransportTarball           = tarball.Transport.Name()
	TransportContainersStorage = storage.Transport.Name()
)
View Source
var (
	DefaultConfigFile                  string
	DefaultSignaturePolicyPath         = config.DefaultSignaturePolicyPath
	DefaultRootlessSignaturePolicyPath = "containers/policy.json"
	DefaultGraphRoot                   = "/var/lib/containers/storage"
	DefaultRegistriesFilePath          = "/etc/containers/registries.conf"
	DefaultRootlessRegistriesFilePath  = "containers/registries.conf"
)
View Source
var DefaultTransport = OCIArchive
View Source
var (
	IsRootless = wrapunshare.IsRootless
)

Functions

func AllContainerSubCommands

func AllContainerSubCommands() []*cobra.Command

func AllImageSubCommands

func AllImageSubCommands() []*cobra.Command

func AllSubCommands

func AllSubCommands() []*cobra.Command

func FormatReferenceWithTransportName

func FormatReferenceWithTransportName(tr string, ref string) string

func GetCurrentUserFromKubeConfig

func GetCurrentUserFromKubeConfig(filename string) (userid string, err error)

func PreloadIfTarFile

func PreloadIfTarFile(images []string, transport string) ([]string, error)

func RegisterGlobalFlags

func RegisterGlobalFlags(fs *pflag.FlagSet) error

func RegisterPostRun

func RegisterPostRun(fn func() error)

func RegisterRootCommand

func RegisterRootCommand(cmd *cobra.Command)

func SetRequireBuildahAnnotation

func SetRequireBuildahAnnotation(cmds ...*cobra.Command)

SetRequireBuildahAnnotation explicit call this function on commands that require buildah module dependency

func Tail

func Tail(a []string) []string

Tail returns a string slice after the first element unless there are not enough elements, then it returns an empty slice. This is to replace the urfavecli Tail method for args

func TrySetupWithDefaults

func TrySetupWithDefaults(setters ...Setter) error

func UsageTemplate

func UsageTemplate() string

UsageTemplate returns the usage template for podman commands This blocks the displaying of the global options. The main podman command should not use this.

func ValidateTransport

func ValidateTransport(s string) error

Types

type DiffType

type DiffType uint8

extra type to use as enum

const (
	// only diff containers
	DiffContainer DiffType = 1 << iota
	// only diff images
	DiffImage
	// diff both containers and images
	DiffAll DiffType = 0b11111111
)

func (DiffType) String

func (d DiffType) String() string

type FlagSetter

type FlagSetter func(*pflag.FlagSet) error

func WithPlatformOption

func WithPlatformOption(pf v1.Platform) FlagSetter

func WithPullPolicyOption

func WithPullPolicyOption(policy string) FlagSetter

type InspectOutput

type InspectOutput struct {
	Name            string        `json:",omitempty"`
	FromImageDigest digest.Digest `json:",omitempty"`
	FromImageID     digest.Digest `json:",omitempty"`
	OCIv1           *ociv1.Image  `json:"OCIv1,omitempty"`
}

type Interface

type Interface interface {
	Pull(imageNames []string, opts ...FlagSetter) error
	Load(input string, ociType string) (string, error)
	InspectImage(name string, opts ...string) (*InspectOutput, error)
	Create(name string, image string, opts ...FlagSetter) (buildah.BuilderInfo, error)
	Delete(name string) error
	InspectContainer(name string) (buildah.BuilderInfo, error)
	ListContainers() ([]JSONContainer, error)
	Runtime() *Runtime
}

func New

func New(id string) (Interface, error)

type JSONContainer

type JSONContainer struct {
	ID            string `json:"id"`
	Builder       bool   `json:"builder"`
	ImageID       string `json:"imageid"`
	ImageName     string `json:"imagename"`
	ContainerName string `json:"containername"`
}

type Runtime

type Runtime struct {
	storage.Store
	*libimage.Runtime
}

func (*Runtime) PullOrLoadImages

func (r *Runtime) PullOrLoadImages(ctx context.Context, args []string, options libimage.CopyOptions) ([]string, error)

type Setter

type Setter func() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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