Documentation ¶
Index ¶
- Constants
- func Build(ctx context.Context, cli client.CommonAPIClient, tag string, dockerfile string, ...) (imageID string, err error)
- func BuildLegacy(ctx context.Context, cli client.CommonAPIClient, path string, tag string, ...) (string, error)
- func GetLabel(ctx context.Context, cli client.CommonAPIClient, imageID string, ...) (string, bool)
- func Pull(ctx context.Context, cli client.ImageAPIClient, ref string) error
- func PullIfNotFound(ctx context.Context, cli client.ImageAPIClient, ref string) error
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 PullIfNotFound ¶
PullIfNotFound pulls an image using Pull if the image doesn't already exist.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.