buildah

package
v1.2.36 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultShmSize              = "65536k"
	BuildahImage                = "ghcr.io/werf/buildah:v1.22.3-1"
	BuildahStorageContainerName = "werf-buildah-storage"
)
View Source
const (
	MaxPullPushRetries = 3
	PullPushRetryDelay = 2 * time.Second
)

Variables

This section is empty.

Functions

func BuildahWithFuseDockerArgs added in v1.2.35

func BuildahWithFuseDockerArgs(storageContainerName, dockerConfigDir string) []string

func NativeRootlessProcessStartupHook

func NativeRootlessProcessStartupHook() bool

func ProcessStartupHook

func ProcessStartupHook(mode Mode) (bool, error)

Types

type BaseBuildah

type BaseBuildah struct {
	TmpDir   string
	Insecure bool
}

func NewBaseBuildah

func NewBaseBuildah(tmpDir string, opts BaseBuildahOpts) (*BaseBuildah, error)

func (*BaseBuildah) NewSessionTmpDir

func (b *BaseBuildah) NewSessionTmpDir() (string, error)

type BaseBuildahOpts added in v1.2.35

type BaseBuildahOpts struct {
	Insecure bool
}

type BuildFromDockerfileOpts

type BuildFromDockerfileOpts struct {
	CommonOpts
	ContextTar io.Reader
}

type Buildah

type Buildah interface {
	Tag(ctx context.Context, ref, newRef string, opts TagOpts) error
	Push(ctx context.Context, ref string, opts PushOpts) error
	BuildFromDockerfile(ctx context.Context, dockerfile []byte, opts BuildFromDockerfileOpts) (string, error)
	RunCommand(ctx context.Context, container string, command []string, opts RunCommandOpts) error
	FromCommand(ctx context.Context, container string, image string, opts FromCommandOpts) error
	Pull(ctx context.Context, ref string, opts PullOpts) error
	Inspect(ctx context.Context, ref string) (*types.BuilderInfo, error)
	Rmi(ctx context.Context, ref string, opts RmiOpts) error
}

func NewBuildah

func NewBuildah(mode Mode, opts BuildahOpts) (b Buildah, err error)

type CommonBuildahOpts

type CommonBuildahOpts struct {
	TmpDir   string
	Insecure bool
}

type CommonOpts

type CommonOpts struct {
	LogWriter io.Writer
}

type DockerWithFuseBuildah

type DockerWithFuseBuildah struct {
	BaseBuildah
}

func NewDockerWithFuseBuildah

func NewDockerWithFuseBuildah(commonOpts CommonBuildahOpts, opts DockerWithFuseModeOpts) (*DockerWithFuseBuildah, error)

func (*DockerWithFuseBuildah) BuildFromDockerfile

func (b *DockerWithFuseBuildah) BuildFromDockerfile(ctx context.Context, dockerfile []byte, opts BuildFromDockerfileOpts) (string, error)

func (*DockerWithFuseBuildah) FromCommand

func (b *DockerWithFuseBuildah) FromCommand(ctx context.Context, container string, image string, opts FromCommandOpts) error

func (*DockerWithFuseBuildah) Inspect

TODO(ilya-lesikov): make it more generic to handle not only images

func (*DockerWithFuseBuildah) Pull

func (b *DockerWithFuseBuildah) Pull(ctx context.Context, ref string, opts PullOpts) error

func (*DockerWithFuseBuildah) Push

func (b *DockerWithFuseBuildah) Push(ctx context.Context, ref string, opts PushOpts) error

func (*DockerWithFuseBuildah) Rmi

func (b *DockerWithFuseBuildah) Rmi(ctx context.Context, ref string, opts RmiOpts) error

func (*DockerWithFuseBuildah) RunCommand

func (b *DockerWithFuseBuildah) RunCommand(ctx context.Context, container string, command []string, opts RunCommandOpts) error

func (*DockerWithFuseBuildah) Tag

func (b *DockerWithFuseBuildah) Tag(ctx context.Context, ref, newRef string, opts TagOpts) error

type DockerWithFuseModeOpts

type DockerWithFuseModeOpts struct{}

type FromCommandOpts

type FromCommandOpts struct {
	CommonOpts
}

type Mode

type Mode string
const (
	ModeAuto           Mode = "auto"
	ModeNativeRootless Mode = "native-rootless"
	ModeDockerWithFuse Mode = "docker-with-fuse"
)

func ResolveMode

func ResolveMode(mode Mode) Mode

type NativeRootlessBuildah

type NativeRootlessBuildah struct {
	BaseBuildah

	Store   storage.Store
	Runtime libimage.Runtime
}

func NewNativeRootlessBuildah

func NewNativeRootlessBuildah(commonOpts CommonBuildahOpts, opts NativeRootlessModeOpts) (*NativeRootlessBuildah, error)

func (*NativeRootlessBuildah) BuildFromDockerfile

func (b *NativeRootlessBuildah) BuildFromDockerfile(ctx context.Context, dockerfile []byte, opts BuildFromDockerfileOpts) (string, error)

func (*NativeRootlessBuildah) FromCommand

func (b *NativeRootlessBuildah) FromCommand(ctx context.Context, container string, image string, opts FromCommandOpts) error

func (*NativeRootlessBuildah) Inspect

Inspect returns nil, nil if image not found.

func (*NativeRootlessBuildah) Pull

func (b *NativeRootlessBuildah) Pull(ctx context.Context, ref string, opts PullOpts) error

func (*NativeRootlessBuildah) Push

func (b *NativeRootlessBuildah) Push(ctx context.Context, ref string, opts PushOpts) error

func (*NativeRootlessBuildah) Rmi

func (b *NativeRootlessBuildah) Rmi(ctx context.Context, ref string, opts RmiOpts) error

func (*NativeRootlessBuildah) RunCommand

func (b *NativeRootlessBuildah) RunCommand(ctx context.Context, container string, command []string, opts RunCommandOpts) error

func (*NativeRootlessBuildah) Tag

func (b *NativeRootlessBuildah) Tag(_ context.Context, ref, newRef string, opts TagOpts) error

type NativeRootlessModeOpts

type NativeRootlessModeOpts struct{}

type PullOpts

type PullOpts struct {
	CommonOpts
}

type PushOpts

type PushOpts struct {
	CommonOpts
}

type RmiOpts

type RmiOpts struct {
	CommonOpts
	Force bool
}

type RunCommandOpts

type RunCommandOpts struct {
	CommonOpts
	BuildArgs []string
}

type TagOpts

type TagOpts struct {
	CommonOpts
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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