unregistry

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package unregistry builds local images and transfers them to remote Docker hosts through psviderski/unregistry's docker-pussh plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildRequest added in v0.6.0

type BuildRequest struct {
	Image      string
	ContextDir string
	Dockerfile string
	Platform   string
	Args       map[string]string
	Target     string
}

BuildRequest describes a platform-specific local build.

type Client added in v0.6.0

type Client struct {
	Runner Runner
	Stdout io.Writer
	Stderr io.Writer
}

Client wraps Docker buildx and docker-pussh.

func (Client) Build added in v0.6.0

func (c Client) Build(ctx context.Context, req BuildRequest) error

Build builds and loads a single-platform image into local Docker.

func (Client) CheckAvailable added in v0.6.0

func (c Client) CheckAvailable(ctx context.Context) error

CheckAvailable verifies local Docker, buildx, and docker-pussh are usable.

func (Client) Push added in v0.6.0

func (c Client) Push(ctx context.Context, req PushRequest) error

Push transfers an image to a remote Docker host using docker-pussh.

type CommandSpec added in v0.6.0

type CommandSpec struct {
	Dir                 string
	Env                 []string
	Name                string
	Args                []string
	SensitiveArgIndexes []int
}

CommandSpec describes a local command invocation.

type ExecRunner added in v0.6.0

type ExecRunner struct {
	Stdout io.Writer
	Stderr io.Writer
}

ExecRunner runs commands with os/exec.

func (ExecRunner) Run added in v0.6.0

func (r ExecRunner) Run(ctx context.Context, spec CommandSpec) (string, error)

Run executes a local command and returns combined stdout/stderr output.

type PushRequest added in v0.6.0

type PushRequest struct {
	Image      string
	Target     string
	SSHKey     string
	Platform   string
	NoHostKeys bool
}

PushRequest describes a docker-pussh transfer to one remote Docker host.

type Runner added in v0.6.0

type Runner interface {
	Run(ctx context.Context, spec CommandSpec) (string, error)
}

Runner executes local commands. Tests use this to verify exact Docker CLI invocations without requiring Docker.

Jump to

Keyboard shortcuts

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