Documentation ¶
Index ¶
- func Client() (*client.Client, error)
- func Create(image string, withNetwork bool) (string, error)
- func Export(container string) (io.ReadCloser, error)
- func HasImage(ref *reference.Spec) error
- func InspectImage(cli *client.Client, ref *reference.Spec) (dockertypes.ImageInspect, error)
- func Rm(container string) error
- func Save(image string) (io.ReadCloser, error)
- type ImageSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create create a container from the given image in docker, returning the full hash ID of the created container. Does not start the container.
func Export ¶
func Export(container string) (io.ReadCloser, error)
Export export the provided container ID from docker using `docker export`. The container must already exist.
func InspectImage ¶
func InspectImage(cli *client.Client, ref *reference.Spec) (dockertypes.ImageInspect, error)
InspectImage inspect the provided ref.
Types ¶
type ImageSource ¶
type ImageSource struct {
// contains filtered or unexported fields
}
ImageSource a source for an image in the docker engine. Implements a moby.ImageSource.
func NewSource ¶
func NewSource(ref *reference.Spec) ImageSource
NewSource return an ImageSource for a specific ref from docker.
func (ImageSource) Config ¶
func (d ImageSource) Config() (imagespec.ImageConfig, error)
Config return the imagespec.ImageConfig for the given source.
func (ImageSource) Descriptor ¶
func (d ImageSource) Descriptor() *v1.Descriptor
Descriptor return the descriptor of the image.
func (ImageSource) TarReader ¶
func (d ImageSource) TarReader() (io.ReadCloser, error)
TarReader return an io.ReadCloser to read the filesystem contents of the image.
func (ImageSource) V1TarReader ¶
func (d ImageSource) V1TarReader(overrideName string) (io.ReadCloser, error)
V1TarReader return an io.ReadCloser to read the save of the image