Documentation
¶
Index ¶
- func ComputeChecksum(data []byte) string
- func GetEnv(key string) string
- func Getenv(key string) string
- func ParseImageTag(imageTag string) (string, string)
- func SumChecksum(sums ...[]byte) string
- func TarDir(src fs.ReadDirFS) (*bytes.Buffer, error)
- func TarDirConcurrent(src fs.ReadDirFS, fileCount int, totalSize int64) (*bytes.Buffer, error)
- func TarDirSequential(src fs.ReadDirFS) (*bytes.Buffer, error)
- type Build
- type BuildGroup
- type BuildGroups
- type BuildLoop
- type BuildType
- type Container
- func (c *Container) Apply(opts *types.ContainerConfig)
- func (c *Container) BuildImage(dockerfile []byte, imageName string) error
- func (c *Container) BuildImageByPlatform(dockerfile []byte, imageName string, platform string) error
- func (c *Container) BuildImageByPlatforms(dockerfile []byte, dockerCtx *bytes.Buffer, imageName string, ...) ([]string, error)
- func (c *Container) BuildIntermidiateContainer(image string, dockerFile []byte, platforms ...string) error
- func (c *Container) BuildingContainer(opts types.ContainerConfig) error
- func (c *Container) Commit(imageTag string, comment string, changes ...string) (string, error)
- func (c *Container) CopyContentTo(content, dest string) error
- func (c *Container) CopyDirectoryTo(srcPath, dstPath string) error
- func (c *Container) CopyFileFromContainer(srcPath string) (string, error)
- func (c *Container) CopyFileTo(srcPath, destPath string) error
- func (c *Container) Create(opts types.ContainerConfig) error
- func (c *Container) Exec(cmd ...string) error
- func (c *Container) GetBuild() *Build
- func (c *Container) ImageExists(imageName string, platforms ...string) (bool, error)
- func (c *Container) Inspect() (*types.ContainerConfig, error)
- func (c *Container) InspectImage(image string) (*types.ImageInfo, error)
- func (c *Container) Pull(imageTags ...string) error
- func (c *Container) PullByPlatform(platform string, imageTags ...string) error
- func (c *Container) PullDefault(imageTags ...string) error
- func (c *Container) Push(source, target string, opts ...PushOption) error
- func (c *Container) Ready() error
- func (c *Container) Start() error
- func (c *Container) Stop() error
- func (c *Container) Tag(source, target string) error
- func (c *Container) Wait() error
- type Custom
- type EnvType
- type Leader
- type PushOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeChecksum ¶
ComputeChecksum computes SHA256 checksum with memory optimizations Uses streaming approach and buffer pooling for better performance
func ParseImageTag ¶
func SumChecksum ¶ added in v0.5.1
SumChecksum combines multiple checksums with memory optimization
func TarDir ¶ added in v0.5.1
TarDir creates a tar archive from a filesystem with memory optimizations and concurrent processing
func TarDirConcurrent ¶ added in v0.18.0
TarDirConcurrent creates a tar archive using concurrent processing for better performance
Types ¶
type Build ¶
type Build struct {
Leader Leader
Platform types.Platform
Custom Custom
Registries map[string]*protos2.ContainerRegistry
ContainerFiles map[string]*protos2.ContainerFile
Secret map[string]string
ContainifyRegistry string
Runtime utils.RuntimeType
RuntimeClient func() cri.ContainerManager `json:"-"`
Image string `json:"image"`
ImageTag string `json:"image_tag"`
File string
Env EnvType
Folder string
Repository string
Organization string
App string `json:"app"`
BuildType BuildType `json:"build_type"`
BuilderFunction string
Registry string
SourcePackages []string
SourceFiles []string
Verbose bool
// contains filtered or unexported fields
}
TODO: add target container platform Build struct optimized for memory alignment and cache performance
func NewGoServiceBuild ¶
func NewMavenServiceBuild ¶
func NewPythonServiceBuild ¶
func NewServiceBuild ¶
func (*Build) AsFlags ¶
AsFlags converts build configuration to command-line flags with memory optimization
func (*Build) CustomString ¶ added in v0.4.0
type BuildGroup ¶ added in v0.11.0
type BuildGroup struct {
Builds []*Build
}
type BuildGroups ¶ added in v0.11.0
type BuildGroups []*BuildGroup
type BuildType ¶
type BuildType string
type Container ¶
type Container struct {
Source fs.ReadDirFS
Build *Build
Secret map[string]string
Env EnvType
Prefix string
Image string
Name string
ID string
Opts types.ContainerConfig
Verbose bool
// contains filtered or unexported fields
}
func NewWithManager ¶ added in v0.36.0
func NewWithManager(manager cri.ContainerManager) *Container
func (*Container) Apply ¶
func (c *Container) Apply(opts *types.ContainerConfig)
func (*Container) BuildImage ¶
func (*Container) BuildImageByPlatform ¶
func (*Container) BuildImageByPlatforms ¶
func (*Container) BuildIntermidiateContainer ¶
func (*Container) BuildingContainer ¶
func (c *Container) BuildingContainer(opts types.ContainerConfig) error
func (*Container) CopyContentTo ¶
func (*Container) CopyDirectoryTo ¶
TODO: ignore hidden folder and files maybe support .dockerignore file or more .dockerinclude file to include folder and files that are ignored by default
func (*Container) CopyFileFromContainer ¶
CopyFileFromContainer reads a single file from a container and returns its content as a string.
func (*Container) CopyFileTo ¶
func (*Container) ImageExists ¶
imageExists checks if the image with the specified tag exists.
func (*Container) InspectImage ¶
func (*Container) PullByPlatform ¶
func (*Container) PullDefault ¶
type EnvType ¶
type EnvType string
type PushOption ¶
type PushOption struct {
Remove bool
}