Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddImages ¶ added in v0.2.0
AddImages adds images to the global set. It returns an error if there are any ID collisions.
func IterateImages ¶ added in v0.2.0
IterateImages iterates over all images in the global set.
Types ¶
type Image ¶
type Image struct { Config *ImageConfig // contains filtered or unexported fields }
Image holds the information about a Docker image.
func FindImage ¶ added in v0.2.0
FindImage searches in the global set for an image ID and returns (*Image, true) if found. If not found it returns (nil, false).
func (*Image) Build ¶
Build wraps the internal build function, it guarantees to construct the image only once by using sync.Once. If the image was already built, it returns (false, nil). If any error occurs, it returns (false, err). If the image was built succesfully, it returns (true, nil).
func (*Image) BuildDeps ¶ added in v0.3.0
BuildDeps builds all the images that are needed by the image. It runs as a DFS algorithm.
func (*Image) FullNamesWithTags ¶
FullNamesWithTags returns a list of strings, each string is the full name of the image with one of its tags.
type ImageConfig ¶ added in v0.1.0
type ImageConfig struct { ID string `yaml:"id"` Name string `yaml:"name"` Tags []string `yaml:"tags"` Context string `yaml:"context"` Dockerfile string `yaml:"dockerfile"` Target string `yaml:"target"` BuildArgs map[string]*string `yaml:"buildArgs"` Registry string `yaml:"registry"` Needs []string `yaml:"needs"` }
ImageConfig has all the configurations for a Docker image. They are defined in the bob.yaml file.
type ImagesSet ¶ added in v0.2.0
type ImagesSet struct {
// contains filtered or unexported fields
}
ImagesSet is a set of images. It maps image IDs to images.
func NewImagesSet ¶ added in v0.2.0
NewImagesSet returns a new instance of ImagesSet. You may pass initial images to the constructor.
func (*ImagesSet) AddImages ¶ added in v0.2.0
AddImages adds images to the set. It returns an error if there are any ID collisions.
func (*ImagesSet) FindImage ¶ added in v0.2.0
FindImage searches for an image ID and returns (*Image, true) if found. If not found it returns (nil, false).
func (*ImagesSet) IterateImages ¶ added in v0.2.0
IterateImages iterates over all images in the set.