builder

package
v0.0.0-...-9de8873 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidContextDir = errors.New("invalid context directory")
)

Functions

This section is empty.

Types

type BasicImageBuilder

type BasicImageBuilder struct {
	ShowBuildLogs bool
	BuildOptions  docker.BuildImageOptions
	APIClient     *docker.Client
	BuildLog      bytes.Buffer
}

BasicImageBuilder creates regular container images

func NewBasicImageBuilder

func NewBasicImageBuilder(client *docker.Client,

	cbOpts *config.ContainerBuildOptions,
	buildContext string,
	showBuildLogs bool) (*BasicImageBuilder, error)

NewBasicImageBuilder creates a new BasicImageBuilder instances

func (*BasicImageBuilder) Build

func (b *BasicImageBuilder) Build() error

Build creates a new container image

func (*BasicImageBuilder) Remove

func (b *BasicImageBuilder) Remove() error

Remove deletes the configured container image

type ImageBuilder

type ImageBuilder struct {
	BasicImageBuilder
	RepoName       string
	AdditionalTags []string
	ID             string
	Entrypoint     []string
	Cmd            []string
	WorkingDir     string
	Env            []string
	Labels         map[string]string
	ExposedPorts   map[docker.Port]struct{}
	Volumes        map[string]struct{}
	OnBuild        []string
	User           string
	HasData        bool
	TarData        bool
}

ImageBuilder creates new optimized container images

func NewImageBuilder

func NewImageBuilder(
	client *docker.Client,
	imageRepoNameTag string,
	additionalTags []string,
	imageInfo *docker.Image,
	artifactLocation string,
	showBuildLogs bool,
	overrideSelectors map[string]bool,
	overrides *config.ContainerOverrides,
	instructions *config.ImageNewInstructions,
	sourceImage string) (*ImageBuilder, error)

NewImageBuilder creates a new ImageBuilder instances

func (*ImageBuilder) Build

func (b *ImageBuilder) Build() error

Build creates a new container image

func (*ImageBuilder) GenerateDockerfile

func (b *ImageBuilder) GenerateDockerfile() error

GenerateDockerfile creates a Dockerfile file

Jump to

Keyboard shortcuts

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