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 ContainersOptions
- type CopyOpts
- type FromCommandOpts
- type ImagesOptions
- 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) Containers(ctx context.Context, opts ContainersOptions) (image.ContainerList, 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) GetDefaultPlatform() string
- func (b *NativeBuildah) GetRuntimePlatform() string
- func (b *NativeBuildah) Images(ctx context.Context, opts ImagesOptions) (image.ImagesList, 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" DefaultContainersConfig = `` /* 211-byte string literal not displayed */ 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 ¶
func GetBasicBuildahCliArgs(driver StorageDriver) ([]string, error)
func GetDefaultIsolation ¶
func GetDefaultIsolation() (thirdparty.Isolation, error)
func GetFuseOverlayfsOptions ¶
func NativeProcessStartupHook ¶
func NativeProcessStartupHook() bool
func NewNativeStoreOptions ¶
func NewNativeStoreOptions(rootlessUID int, driver StorageDriver) (*thirdparty.StoreOptions, error)
func ProcessStartupHook ¶
Types ¶
type AddOpts ¶
type AddOpts struct { CommonOpts ContextDir string Chown string Chmod string Ignores []string }
type BuildFromCommandsOpts ¶
type BuildFromCommandsOpts CommonOpts
type BuildFromDockerfileOpts ¶
type Buildah ¶
type Buildah interface { GetDefaultPlatform() string GetRuntimePlatform() string 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 Images(ctx context.Context, opts ImagesOptions) (image.ImagesList, error) Containers(ctx context.Context, opts ContainersOptions) (image.ContainerList, error) }
func NewBuildah ¶
func NewBuildah(mode Mode, opts BuildahOpts) (b Buildah, err error)
type BuildahOpts ¶
type BuildahOpts struct { CommonBuildahOpts NativeModeOpts }
type CommitOpts ¶
type CommitOpts struct { CommonOpts Image string }
type CommonBuildahOpts ¶
type CommonBuildahOpts struct { Isolation *thirdparty.Isolation StorageDriver *StorageDriver TmpDir string Insecure bool RegistryMirrors []string }
type CommonOpts ¶
type ConfigOpts ¶
type ConfigOpts struct { CommonOpts Labels []string Volumes []string Expose []string Envs map[string]string Cmd []string CmdPrependShell bool Entrypoint []string EntrypointPrependShell bool // If CMD is defined from the base image, setting ENTRYPOINT will reset CMD to an empty value. // https://docs.docker.com/reference/dockerfile/#understand-how-cmd-and-entrypoint-interact EntrypointResetCMD bool User string Workdir string Healthcheck *thirdparty.BuildahHealthConfig OnBuild string StopSignal string Shell []string Maintainer string }
type ContainersOptions ¶
type ContainersOptions struct { CommitOpts Filters []image.ContainerFilter }
type FromCommandOpts ¶
type FromCommandOpts CommonOpts
type ImagesOptions ¶
type MountOpts ¶
type MountOpts CommonOpts
type NativeBuildah ¶
type NativeBuildah struct { Isolation thirdparty.Isolation TmpDir string InstanceTmpDir string ConfigTmpDir string SignaturePolicyPath string ContainersConfigPath string RegistriesConfigPath string RegistriesConfigDirPath string Insecure bool Store storage.Store // contains filtered or unexported fields }
func NewNativeBuildah ¶
func NewNativeBuildah(commonOpts CommonBuildahOpts, opts NativeModeOpts) (*NativeBuildah, error)
func (*NativeBuildah) BuildFromDockerfile ¶
func (b *NativeBuildah) BuildFromDockerfile(ctx context.Context, dockerfile string, opts BuildFromDockerfileOpts) (string, error)
func (*NativeBuildah) Commit ¶
func (b *NativeBuildah) Commit(ctx context.Context, container string, opts CommitOpts) (string, error)
func (*NativeBuildah) Config ¶
func (b *NativeBuildah) Config(ctx context.Context, container string, opts ConfigOpts) error
func (*NativeBuildah) Containers ¶
func (b *NativeBuildah) Containers(ctx context.Context, opts ContainersOptions) (image.ContainerList, error)
func (*NativeBuildah) FromCommand ¶
func (b *NativeBuildah) FromCommand(ctx context.Context, container, image string, opts FromCommandOpts) (string, error)
func (*NativeBuildah) GetDefaultPlatform ¶
func (b *NativeBuildah) GetDefaultPlatform() string
func (*NativeBuildah) GetRuntimePlatform ¶
func (b *NativeBuildah) GetRuntimePlatform() string
func (*NativeBuildah) Images ¶
func (b *NativeBuildah) Images(ctx context.Context, opts ImagesOptions) (image.ImagesList, error)
func (*NativeBuildah) Inspect ¶
func (b *NativeBuildah) Inspect(ctx context.Context, ref string) (*thirdparty.BuilderInfo, error)
Inspect returns nil, nil if image not found.
func (*NativeBuildah) NewSessionTmpDir ¶
func (b *NativeBuildah) NewSessionTmpDir() (string, error)
func (*NativeBuildah) RunCommand ¶
func (b *NativeBuildah) RunCommand(ctx context.Context, container string, command []string, opts RunCommandOpts) error
func (*NativeBuildah) Umount ¶
func (b *NativeBuildah) Umount(ctx context.Context, container string, opts UmountOpts) error
type NativeModeOpts ¶
type NativeModeOpts struct {
DefaultPlatform string
}
type PullOpts ¶
type PullOpts CommonOpts
type PushOpts ¶
type PushOpts CommonOpts
type RmOpts ¶
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 ¶
type StorageDriver string
const ( StorageDriverOverlay StorageDriver = "overlay" StorageDriverVFS StorageDriver = "vfs" )
type StoreOptions ¶
type TagOpts ¶
type TagOpts CommonOpts
type UmountOpts ¶
type UmountOpts CommonOpts
Click to show internal directories.
Click to hide internal directories.