docker

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupResult

type BackupResult struct {
	Path           string `json:"path"`
	SizeBytes      int64  `json:"size_bytes"`
	Container      string `json:"container"`
	Engine         string `json:"engine"`
	User           string `json:"user"`
	DatabasesFound int    `json:"databases_found"`
	TablesFound    int    `json:"tables_found"`
	Verified       bool   `json:"verified"`
	Error          string `json:"error,omitempty"`
}

BackupResult holds the result of a container DB backup

func Backup

func Backup(container string) BackupResult

Backup performs a database backup of a running container

type CleanupResult

type CleanupResult struct {
	DeletedContainers []string `json:"deleted_containers"`
	DeletedImages     []string `json:"deleted_images"`
	DeletedVolumes    []string `json:"deleted_volumes"`
	BuildCacheFreed   string   `json:"build_cache_freed"`
	Kept              []string `json:"kept"`
	DryRun            bool     `json:"dry_run"`
	Error             string   `json:"error,omitempty"`
}

CleanupResult holds the result of a selective docker cleanup

func Cleanup

func Cleanup(keepNames []string, dryRun bool) CleanupResult

Cleanup removes all Docker resources except the kept containers and their deps

type CompactResult

type CompactResult struct {
	RawSize          int64  `json:"raw_size_bytes"`
	RawSizeHuman     string `json:"raw_size"`
	ActualUsed       int64  `json:"actual_used_bytes"`
	ActualUsedHuman  string `json:"actual_used"`
	RecommendedLimit int64  `json:"recommended_limit_bytes"`
	RecommendedHuman string `json:"recommended_limit"`
	Instructions     string `json:"instructions"`
	Error            string `json:"error,omitempty"`
}

CompactResult holds Docker disk compaction analysis

func Compact

func Compact() CompactResult

Compact analyzes Docker.raw vs actual usage and recommends a new disk limit

type ContainerInfo

type ContainerInfo struct {
	Name    string
	Image   string
	Status  string
	Volumes []string
	Env     map[string]string
}

ContainerInfo holds parsed container metadata

Jump to

Keyboard shortcuts

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