build

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDockerfile is the default filename for Dockerfile
	DefaultDockerfile string = "Dockerfile"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerBuildCmd

type DockerBuildCmd struct {
	// Writer to write the build output
	Writer io.Writer
	// Context manages the build context
	Context context.Context
	// Cli is the docker api client
	Cli *client.Client
	// DockerBuildOptions are the options to build
	DockerBuildOptions *DockerBuildOptions
	// DockerPushOptions are the option to push
	DockerPushOptions *push.DockerPushOptions
	// ExecPrefix defines a prefix to each output lines
	ExecPrefix string
	// Response manages responses from docker client
	Response types.Responser
}

DockerBuilderCmd

func (*DockerBuildCmd) Run

func (b *DockerBuildCmd) Run() error

Run execute the docker build https://docs.docker.com/engine/api/v1.39/#operation/ImageBuild

type DockerBuildOptions

type DockerBuildOptions struct {
	// ImageName is the name of the image
	ImageName string
	// Tags is a list of the image tags
	Tags []string
	// BuildArgs ia a list of arguments to set during the building
	BuildArgs map[string]*string
	// Dockerfile is the file name for dockerfile file
	Dockerfile string
	// PushAfterBuild push image to registry after building
	PushAfterBuild bool
	// Auth required to be authenticated to docker registry
	Auth map[string]dockertypes.AuthConfig
	// BuildContext
	DockerBuildContext context.DockerBuildContexter
}

DockerBuildOptions has an options set to build and image

func (*DockerBuildOptions) AddAuth

func (o *DockerBuildOptions) AddAuth(username, password, registry string) error

AddAuth append new tags to DockerBuilder

func (*DockerBuildOptions) AddBuildArgs

func (o *DockerBuildOptions) AddBuildArgs(arg string, value string) error

AddBuildArgs append new tags to DockerBuilder

func (*DockerBuildOptions) AddTags

func (o *DockerBuildOptions) AddTags(tag string)

AddTags append new tags to DockerBuilder

Directories

Path Synopsis
git
url

Jump to

Keyboard shortcuts

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