nerdctl

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package nerdctl implements the runtime.Runtime interface using the ctrctl CLI wrapper. This supports the nerdctl CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nerdctl

type Nerdctl struct {
	// contains filtered or unexported fields
}

Nerdctl implements runtime.Runtime by shelling out to a container CLI.

func New

func New(cli []string) (*Nerdctl, error)

New creates a Ctrctl runtime using the specified CLI command. cli is the command prefix, e.g. []string{"nerdctl"} or []string{"docker"}.

func (*Nerdctl) Close

func (c *Nerdctl) Close() error

Close is a no-op for CLI-based runtimes.

func (*Nerdctl) ImageExists

func (c *Nerdctl) ImageExists(_ context.Context, imageRef string) bool

ImageExists reports whether the given image reference exists locally.

func (*Nerdctl) InspectSelf

func (c *Nerdctl) InspectSelf(_ context.Context) (runtime.ContainerInfo, error)

InspectSelf inspects the current container using os.Hostname() as the container ID.

func (*Nerdctl) Ping

func (c *Nerdctl) Ping(_ context.Context) error

Ping verifies the CLI is available and responsive.

func (*Nerdctl) PullImage

func (c *Nerdctl) PullImage(_ context.Context, imageRef string) error

PullImage pulls the given image reference from a registry.

func (*Nerdctl) RunContainer

func (c *Nerdctl) RunContainer(_ context.Context, info runtime.ContainerInfo) error

RunContainer creates and starts a detached container with the given configuration.

Jump to

Keyboard shortcuts

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