image

package
v0.0.0-...-d13921b Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Copyright © 2023 William Wang <williamw0825@gmail.com>

Copyright © 2023 William Wang <williamw0825@gmail.com>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportImages

func ExportImages(dockerCli docker.Cli, images []string) (io.ReadCloser, error)

ExportImages export images

func ExportUntarImages

func ExportUntarImages(dockerCli docker.Cli, opts commonImageOptions, getPatternFunc GetPatternFunc) (string, error)

ExportUntarImages export and untar images

func ImageInspect

func ImageInspect(dockerCli docker.Cli, images []string) ([]types.ImageInspect, error)

func ImagesConcatFmt

func ImagesConcatFmt(images []string) string

func NewDiffCommand

func NewDiffCommand(dockerCli docker.Cli) *cobra.Command

NewDiffCommand compare two images and show diff between layers

func NewSaveCommand

func NewSaveCommand(dockerCli docker.Cli) *cobra.Command

NewSaveCommand creates a new `docker save` command

func NewStatsCommand

func NewStatsCommand(dockerCli docker.Cli) *cobra.Command

NewStatsCommand creates a new `docker-save stat` command

func OmitString

func OmitString(str string, maxLength int) string

func ResolveManifests

func ResolveManifests(workDir string) ([]manifestItem, error)

func RunDiff

func RunDiff(dockerCli docker.Cli, opts diffOptions) error

func RunSave

func RunSave(dockerCli docker.Cli, opts saveOptions) error

RunSave performs a save against the engine based on the specified options

func RunStats

func RunStats(dockerCli docker.Cli, opts statsOptions) error

RunStats to stats image layers information

Types

type GetPatternFunc

type GetPatternFunc func() string

GetPatternFunc is a function which used to generate temp dir pattern

type LayerStatsItem

type LayerStatsItem struct {
	Number  int           `json:"number"`
	DiffID  digest.Digest `json:"diff_id"`
	Layer   string        `json:"layer"`
	Created *time.Time    `json:"created,omitempty"`
	Command string        `json:"command"`
	Size    int64         `json:"size"`
}

func (LayerStatsItem) Format

func (layer LayerStatsItem) Format() string

Jump to

Keyboard shortcuts

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