image

package
v0.0.0-...-3b91d86 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LegacyTemplateName is the name of the Dockerfile template in
	// assignment directory.
	LegacyTemplateName = "Dockerfile.tmpl"
	// LegacyContextSubdir is the name of the subdirectory in the assignment
	// directory containing the docker build context.
	LegacyContextSubdir = "context"
)

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, cli client.CommonAPIClient, tag string, dockerfile string, contextPath string) (imageID string, err error)

Build builds a docker image on the given docker client, given the Dockerfile as a string and the path to the build context.

func BuildLegacy

func BuildLegacy(ctx context.Context, cli client.CommonAPIClient, path string, tag string, tmplData interface{}) (string, error)

BuildLegacy builds a docker image on the given docker client. The process used differs from the "normal" docker build process in that the Dockerfile is a template, and exists outside of the normal build directory. A typical layout looks like:

test
+-- context
|   +-- helloworld.txt
+-- Dockerfile.tmpl

func GetLabel

func GetLabel(ctx context.Context, cli client.CommonAPIClient, imageID string, labelName string) (string, bool)

GetLabel gets a label from an image.

func Pull

func Pull(ctx context.Context, cli client.ImageAPIClient, ref string) error

Pull pulls a docker image by ref name.

func PullIfNotFound

func PullIfNotFound(ctx context.Context, cli client.ImageAPIClient, ref string) error

PullIfNotFound pulls an image using Pull if the image doesn't already exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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