libcompose: Index | Files

package builder

import ""


Package Files



const DefaultDockerfileName = "Dockerfile"

DefaultDockerfileName is the default name of a Dockerfile

func CreateTar Uses

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

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

type Builder Uses

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 Uses

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 Uses

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.

Package builder imports 19 packages (graph) and is imported by 10 packages. Updated 2019-08-09. Refresh now. Tools for package owners.