Documentation ¶
Index ¶
- Constants
- Variables
- func GetBasicBuildahCliArgs(driver StorageDriver) ([]string, error)
- func GetDefaultIsolation() (thirdparty.Isolation, error)
- func GetFuseOverlayfsOptions() ([]string, error)
- func NativeProcessStartupHook() bool
- func NewNativeStoreOptions(rootlessUID int, driver StorageDriver) (*thirdparty.StoreOptions, error)
- func ProcessStartupHook(mode Mode) (bool, error)
- type AddOpts
- type BuildFromCommandsOpts
- type BuildFromDockerfileOpts
- type Buildah
- type BuildahOpts
- type CommitOpts
- type CommonBuildahOpts
- type CommonOpts
- type ConfigOpts
- type CopyOpts
- type FromCommandOpts
- type Mode
- type MountOpts
- type NativeBuildah
- func (b *NativeBuildah) Add(ctx context.Context, container string, src []string, dst string, opts AddOpts) error
- func (b *NativeBuildah) BuildFromDockerfile(ctx context.Context, dockerfile string, opts BuildFromDockerfileOpts) (string, error)
- func (b *NativeBuildah) Commit(ctx context.Context, container string, opts CommitOpts) (string, error)
- func (b *NativeBuildah) Config(ctx context.Context, container string, opts ConfigOpts) error
- func (b *NativeBuildah) Copy(ctx context.Context, container, contextDir string, src []string, dst string, ...) error
- func (b *NativeBuildah) FromCommand(ctx context.Context, container, image string, opts FromCommandOpts) (string, error)
- func (b *NativeBuildah) Inspect(ctx context.Context, ref string) (*thirdparty.BuilderInfo, error)
- func (b *NativeBuildah) Mount(ctx context.Context, container string, opts MountOpts) (string, error)
- func (b *NativeBuildah) NewSessionTmpDir() (string, error)
- func (b *NativeBuildah) Pull(ctx context.Context, ref string, opts PullOpts) error
- func (b *NativeBuildah) Push(ctx context.Context, ref string, opts PushOpts) error
- func (b *NativeBuildah) Rm(ctx context.Context, ref string, opts RmOpts) error
- func (b *NativeBuildah) Rmi(ctx context.Context, ref string, opts RmiOpts) error
- func (b *NativeBuildah) RunCommand(ctx context.Context, container string, command []string, opts RunCommandOpts) error
- func (b *NativeBuildah) Tag(_ context.Context, ref, newRef string, opts TagOpts) error
- func (b *NativeBuildah) Umount(ctx context.Context, container string, opts UmountOpts) error
- type NativeModeOpts
- type PullOpts
- type PushOpts
- type RmOpts
- type RmiOpts
- type RunCommandOpts
- type RunMount
- type StorageDriver
- type StoreOptions
- type TagOpts
- type UmountOpts
Constants ¶
View Source
const ( DefaultShmSize = "65536k" DefaultSignaturePolicy = `` /* 126-byte string literal not displayed */ DefaultRegistriesConfig = `unqualified-search-registries = ["docker.io"]` BuildahImage = "registry.werf.io/werf/buildah:v1.22.3-1" BuildahStorageContainerName = "werf-buildah-storage" DefaultStorageDriver StorageDriver = StorageDriverOverlay )
View Source
const ( MaxPullPushRetries = 3 PullPushRetryDelay = 2 * time.Second )
Variables ¶
View Source
var DefaultShell = []string{"/bin/sh", "-c"}
Functions ¶
func GetBasicBuildahCliArgs ¶ added in v1.2.50
func GetBasicBuildahCliArgs(driver StorageDriver) ([]string, error)
func GetDefaultIsolation ¶ added in v1.2.48
func GetDefaultIsolation() (thirdparty.Isolation, error)
func GetFuseOverlayfsOptions ¶ added in v1.2.50
func NativeProcessStartupHook ¶ added in v1.2.48
func NativeProcessStartupHook() bool
func NewNativeStoreOptions ¶ added in v1.2.48
func NewNativeStoreOptions(rootlessUID int, driver StorageDriver) (*thirdparty.StoreOptions, error)
func ProcessStartupHook ¶
Types ¶
type AddOpts ¶ added in v1.2.178
type AddOpts struct { CommonOpts ContextDir string Chown string Chmod string Ignores []string }
type BuildFromCommandsOpts ¶ added in v1.2.178
type BuildFromCommandsOpts struct {
CommonOpts
}
type BuildFromDockerfileOpts ¶
type BuildFromDockerfileOpts struct { CommonOpts ContextDir string BuildArgs map[string]string Target string }
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 string, opts BuildFromDockerfileOpts) (string, error) RunCommand(ctx context.Context, container string, command []string, opts RunCommandOpts) error FromCommand(ctx context.Context, container, image string, opts FromCommandOpts) (string, error) Pull(ctx context.Context, ref string, opts PullOpts) error Inspect(ctx context.Context, ref string) (*thirdparty.BuilderInfo, error) Rm(ctx context.Context, ref string, opts RmOpts) error Rmi(ctx context.Context, ref string, opts RmiOpts) error Mount(ctx context.Context, container string, opts MountOpts) (string, error) Umount(ctx context.Context, container string, opts UmountOpts) error Commit(ctx context.Context, container string, opts CommitOpts) (string, error) Config(ctx context.Context, container string, opts ConfigOpts) error Copy(ctx context.Context, container, contextDir string, src []string, dst string, opts CopyOpts) error Add(ctx context.Context, container string, src []string, dst string, opts AddOpts) error }
func NewBuildah ¶
func NewBuildah(mode Mode, opts BuildahOpts) (b Buildah, err error)
type BuildahOpts ¶
type BuildahOpts struct { CommonBuildahOpts NativeModeOpts }
type CommitOpts ¶ added in v1.2.81
type CommitOpts struct { CommonOpts Image string }
type CommonBuildahOpts ¶
type CommonBuildahOpts struct { Isolation *thirdparty.Isolation StorageDriver *StorageDriver TmpDir string Insecure bool }
type CommonOpts ¶
type ConfigOpts ¶ added in v1.2.81
type ConfigOpts struct { CommonOpts Labels []string Volumes []string Expose []string Envs map[string]string Cmd []string CmdPrependShell bool Entrypoint []string EntrypointPrependShell bool User string Workdir string Healthcheck *thirdparty.BuildahHealthConfig OnBuild string StopSignal string Shell []string Maintainer string }
type CopyOpts ¶ added in v1.2.178
type CopyOpts struct { CommonOpts Chown string Chmod string Ignores []string }
type FromCommandOpts ¶
type FromCommandOpts CommonOpts
type MountOpts ¶ added in v1.2.46
type MountOpts CommonOpts
type NativeBuildah ¶ added in v1.2.48
type NativeBuildah struct { Isolation thirdparty.Isolation TmpDir string InstanceTmpDir string ConfigTmpDir string SignaturePolicyPath string RegistriesConfigPath string RegistriesConfigDirPath string Insecure bool Store storage.Store Runtime libimage.Runtime DefaultSystemContext imgtypes.SystemContext DefaultCommonBuildOptions define.CommonBuildOptions // contains filtered or unexported fields }
func NewNativeBuildah ¶ added in v1.2.48
func NewNativeBuildah(commonOpts CommonBuildahOpts, opts NativeModeOpts) (*NativeBuildah, error)
func (*NativeBuildah) BuildFromDockerfile ¶ added in v1.2.48
func (b *NativeBuildah) BuildFromDockerfile(ctx context.Context, dockerfile string, opts BuildFromDockerfileOpts) (string, error)
func (*NativeBuildah) Commit ¶ added in v1.2.81
func (b *NativeBuildah) Commit(ctx context.Context, container string, opts CommitOpts) (string, error)
func (*NativeBuildah) Config ¶ added in v1.2.81
func (b *NativeBuildah) Config(ctx context.Context, container string, opts ConfigOpts) error
func (*NativeBuildah) FromCommand ¶ added in v1.2.48
func (b *NativeBuildah) FromCommand(ctx context.Context, container, image string, opts FromCommandOpts) (string, error)
func (*NativeBuildah) Inspect ¶ added in v1.2.48
func (b *NativeBuildah) Inspect(ctx context.Context, ref string) (*thirdparty.BuilderInfo, error)
Inspect returns nil, nil if image not found.
func (*NativeBuildah) NewSessionTmpDir ¶ added in v1.2.178
func (b *NativeBuildah) NewSessionTmpDir() (string, error)
func (*NativeBuildah) RunCommand ¶ added in v1.2.48
func (b *NativeBuildah) RunCommand(ctx context.Context, container string, command []string, opts RunCommandOpts) error
func (*NativeBuildah) Umount ¶ added in v1.2.48
func (b *NativeBuildah) Umount(ctx context.Context, container string, opts UmountOpts) error
type NativeModeOpts ¶ added in v1.2.48
type NativeModeOpts struct {
Platform string
}
type PullOpts ¶
type PullOpts CommonOpts
type PushOpts ¶
type PushOpts CommonOpts
type RmOpts ¶ added in v1.2.81
type RmOpts CommonOpts
type RmiOpts ¶
type RmiOpts struct { CommonOpts Force bool }
type RunCommandOpts ¶
type RunCommandOpts struct { CommonOpts ContextDir string PrependShell bool Shell []string AddCapabilities []string DropCapabilities []string NetworkType string WorkingDir string User string Envs []string // Mounts as allowed to be passed from command line. GlobalMounts []*specs.Mount // Mounts as allowed in Dockerfile RUN --mount option. Have more restrictions than GlobalMounts (e.g. Source of bind-mount can't be outside of ContextDir or container root). RunMounts []*instructions.Mount }
type StorageDriver ¶ added in v1.2.48
type StorageDriver string
const ( StorageDriverOverlay StorageDriver = "overlay" StorageDriverVFS StorageDriver = "vfs" )
type StoreOptions ¶ added in v1.2.48
type TagOpts ¶
type TagOpts CommonOpts
type UmountOpts ¶ added in v1.2.46
type UmountOpts CommonOpts
Click to show internal directories.
Click to hide internal directories.