docker

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*dockercli.Client
	// contains filtered or unexported fields
}

Client represents an active docker object

func New

func New(ctx context.Context) (*Client, error)

New initializes a new Docker API client from env

func (*Client) Close

func (c *Client) Close()

Close closes the docker client

func (*Client) ContainerInspect

func (c *Client) ContainerInspect(containerID string) (types.ContainerJSON, error)

ContainerInspect returns the container information.

func (*Client) ImageInspectWithRaw

func (c *Client) ImageInspectWithRaw(imageID string) (types.ImageInspect, error)

ImageInspectWithRaw returns the image information and its raw representation.

func (*Client) IsDanglingImage

func (c *Client) IsDanglingImage(image types.ImageInspect) bool

IsDanglingImage returns whether the given image is "dangling" which means that there are no repository references to the given image, and it has no child images

func (*Client) IsDigest

func (c *Client) IsDigest(imageID string) bool

IsDigest determines image it looks like a digest based image reference.

func (*Client) IsLocalImage

func (c *Client) IsLocalImage(image types.ImageInspect) bool

IsLocalImage checks if the image has been built locally

Jump to

Keyboard shortcuts

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