docker

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package docker is a primitive wrapper over shelling out to 'docker' tool.

Assumes 'docker' binary is in PATH.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, context io.Reader, args []string) (string, error)

Build calls "docker build --iidfile out [args] - < [read from r]".

Types

type Labels

type Labels struct {
	Created      time.Time // org.opencontainers.image.created=<RFC3339 timestamp>
	BuildTool    string    // org.chromium.build.tool="cloudbuildhelper v1.2.3"
	BuildMode    string    // org.chromium.build.mode="local" (or "cloudbuild")
	Inputs       string    // org.chromium.build.inputs=<SHA256 of context tarball>
	BuildID      string    // org.chromium.build.id="...
	CanonicalTag string    // org.chromium.build.canonical=...

	Extra map[string]string // whatever was supplied via -label CLI flag
}

Labels is a schema for docker image labels we set.

See https://github.com/opencontainers/image-spec/blob/master/annotations.md for org.opencontainers.image.* labels.

func (*Labels) AsBuildArgs

func (l *Labels) AsBuildArgs() []string

AsBuildArgs returns ["--label", "k=v", "--label", "k=v", ...].

func (*Labels) Sorted

func (l *Labels) Sorted() []string

Sorted returns a sorted list of k=v pairs with labels.

Jump to

Keyboard shortcuts

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