builder

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDockerfileName = "Dockerfile"

DefaultDockerfileName is the default name of a Dockerfile

Variables

This section is empty.

Functions

func CreateTar

func CreateTar(contextDirectory, dockerfile string) (io.ReadCloser, error)

CreateTar create a build context tar for the specified project and service name.

Types

type Builder

type Builder interface {
	Build(imageName string) error
}

Builder defines methods to provide a docker builder. This makes libcompose not tied up to the docker daemon builder.

type DaemonBuilder

type DaemonBuilder struct {
	Client           client.ImageAPIClient
	ContextDirectory string
	Dockerfile       string
	AuthConfigs      map[string]types.AuthConfig
	NoCache          bool
	ForceRemove      bool
	Pull             bool
	BuildArgs        map[string]*string
	CacheFrom        []string
	Labels           map[string]*string
	Network          string
	Target           string
	LoggerFactory    logger.Factory
}

DaemonBuilder is the daemon "docker build" Builder implementation.

func (*DaemonBuilder) Build

func (d *DaemonBuilder) Build(ctx context.Context, imageName string) error

Build implements Builder. It consumes the docker build API endpoint and sends a tar of the specified service build context.

Jump to

Keyboard shortcuts

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