Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateImageTag(toAbsRefStr, fromAsbRefStr string) (io.ReadCloser, error)
- func (c *Client) ExportImage(absRefStr string) (io.ReadCloser, error)
- func (c *Client) HostImageGC(hostImageGCFunc HostImageGCFunc)
- func (c *Client) ImportImage(absRefStr string, input io.Reader) (io.ReadCloser, error)
- func (c *Client) ListContainerFullIds() ([]string, error)
- func (c *Client) ListContainerIds() ([]string, error)
- func (c *Client) ListContainerNames() ([]string, error)
- func (c *Client) ListContainers() ([]types.Container, error)
- func (c *Client) WithContext(ctx context.Context) *Client
- func (c *Client) WithPage(page *util.Page) *Client
- type HostImageGCFunc
- type ImageRef
Constants ¶
const ( // FilterDangling // +desc // image that without label // +usage // dangling=true|false FilterDangling = "dangling" // FilterLabel // +usage // label=com.example.version=1.0 FilterLabel = "label" // FilterBefore // +usage // before=IMAGE_ID|IMAGE_NAME FilterBefore = "before" // FilterSince // +usage // before=IMAGE_ID|IMAGE_NAME FilterSince = "since" // FilterReference // reference=IMAGE_NAME:IMAGE_TAG FilterReference = "reference" )
filter args in image +referred from: https://docs.docker.com/reference/cli/docker/image/ls/#filter cli: docker image --filter "foo=bar" --filter "bif=baz"
const ( FilterID = "id" FilterName = "name" // FilterExited // +usage // exited=created|restarting|running|removing|paused|exited|dead FilterExited = "exited" FilterStatus = "status" FilterAncestor = "ancestor" FilterVolume = "volume" FilterNetwork = "network" // FilterPublish // FilterExpose // +usage // publish=PORT/[PROTO] | STARTPORT-ENDPORT/[PROTO] FilterPublish = "publish" FilterExpose = "expose" // FilterHealth // +usage // health=starting|healthy|unhealthy|none FilterHealth = "health" // FilterIsolation // +usage // isolation=default|process|hyperv FilterIsolation = "isolation" // FilterIsTask // +usage // is-task=true|false FilterIsTask = "is-task" )
filter args in container +referred from: https://docs.docker.com/reference/cli/docker/container/ls/#filter cli: docker ps --filter "foo=bar" --filter "bif=baz"
const ( // referred from: "github.com/docker/docker/client/image_list_test.go/TestImageListConnectionError ReferenceNone = "no-such-image.invalid:no-such-tag.invalid" ReferenceAll = "*" )
filter constant +self define
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateImageTag ¶ added in v1.1.3
func (c *Client) CreateImageTag(toAbsRefStr, fromAsbRefStr string) (io.ReadCloser, error)
func (*Client) ExportImage ¶ added in v1.1.3
func (c *Client) ExportImage(absRefStr string) (io.ReadCloser, error)
ExportImage +param absRefStr absolutely reference string for registry/project/repository/artifact/name:tag +desc
(1).if image do not exist in docker host local, pull image to local (2).get image id by absRefStr (3).save image to docker host local get io.ReadCloser fd
func (*Client) HostImageGC ¶ added in v1.1.3
func (c *Client) HostImageGC(hostImageGCFunc HostImageGCFunc)
HostImageGC cli: docker rmi IMAGE_ID maybe quota by:
1. image CREATED: since, before 2. image SIZE: bytes(B) 3. cache algorithm policy: lru, lfu 4. host disk: bytes(B)
func (*Client) ImportImage ¶ added in v1.1.3
ImportImage +param input
(1). make sure the input file(.tar.gz) metadata attribute image name format is: registry/project/image_name:image_tag
(1.1). or will create new image tag to local
(2). push image to registry
func (*Client) ListContainerFullIds ¶
func (*Client) ListContainerIds ¶
func (*Client) ListContainerNames ¶
type HostImageGCFunc ¶ added in v1.1.3
type HostImageGCFunc func()
Directories ¶
Path | Synopsis |
---|---|
Package docker_inst/client.go was generated by codegen, do not modify it
|
Package docker_inst/client.go was generated by codegen, do not modify it |