docker

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client added in v1.11.0

func Client() (*docker.Client, error)

Client connects to Docker client on host

Types

type Build

type Build struct {
	Client dockerlib.Client
}

Build will provide methods for interaction with API regarding building images

func (*Build) BuildImage

func (c *Build) BuildImage(source string, image string, dockerfile string, buildargs []dockerlib.BuildArg) error

BuildImage builds a Docker image via the Docker API. Takes the source directory and image name and then builds the appropriate image. Tarball is utilized in order to make building easier.

type Image added in v1.24.0

type Image struct {
	Name       string // the image's name (ie: debian[:8.2])
	ShortName  string // the image's name (ie: debian)
	Tag        string // the image's tag (or digest)
	Registry   string // the image's registry. (ie: host[:port])
	Repository string // the image's repository. (ie: registry/name)
	Remote     string // the image's remote identifier. (ie: registry/name[:tag])
}

Image contains the basic information parsed from full image name see github.com/novln/docker-parser Reference

func NewImageFromParsed added in v1.24.0

func NewImageFromParsed(parsed *dockerparser.Reference) Image

func ParseImage added in v1.24.0

func ParseImage(fullImageName string, targetRegistry string) (Image, error)

ParseImage Using https://github.com/novln/docker-parser in order to parse the appropriate name and registry. 1. Return default registry when the registry is not specified from image 2. Return target registry when the registry is specified from command line

type Push

type Push struct {
	Client dockerlib.Client
}

Push will provide methods for interaction with API regarding pushing images

func (*Push) PushImage

func (c *Push) PushImage(image Image) error

PushImage pushes a Docker image via the Docker API. Takes the image name, parses the URL details and then push based on environment authentication credentials.

type Tag added in v1.24.0

type Tag struct {
	Client dockerlib.Client
}

Tag will provide methods for interaction with API regarding tagging images

func (*Tag) TagImage added in v1.24.0

func (c *Tag) TagImage(image Image) error

Jump to

Keyboard shortcuts

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