podman

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: EPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package podman implements the ContainerEngine interface backed by the Podman daemon. Podman exposes a Docker-compatible API, so this engine is a thin wrapper over the Docker engine adapter pointed at the Podman socket.

Index

Constants

View Source
const (
	// DefaultPodmanSocket is the default Podman socket path for the root user.
	DefaultPodmanSocket = "unix:///run/podman/podman.sock"
	// DefaultPodmanUserSocket is the default Podman socket for rootless installs.
	DefaultPodmanUserSocket = "unix:///run/user/0/podman/podman.sock"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine implements engine.ContainerEngine using the Podman daemon via its Docker-compatible socket API.

func New

func New() *Engine

New returns a new Podman engine. Call Init() before use.

func (*Engine) AreMicroserviceAndContainerEqual

func (e *Engine) AreMicroserviceAndContainerEqual(id string, ms *models.Microservice, registry *models.Registry) bool

func (*Engine) Close

func (e *Engine) Close() error

func (*Engine) CreateContainer

func (e *Engine) CreateContainer(ms *models.Microservice, h string) (string, error)

func (*Engine) CreateExecSession

func (e *Engine) CreateExecSession(id string, runtimeExecID string, cmd []string) (string, error)

func (*Engine) DeleteImage

func (e *Engine) DeleteImage(ctx context.Context, nameOrID string) error

func (*Engine) EnsureNetwork

func (e *Engine) EnsureNetwork(name string) error

func (*Engine) FindLocalImage

func (e *Engine) FindLocalImage(ref, registryURL string, fromCache bool) (bool, error)

func (*Engine) GetAllContainers

func (e *Engine) GetAllContainers() ([]engine.Container, error)

func (*Engine) GetContainer

func (e *Engine) GetContainer(u string) (*engine.Container, error)

func (*Engine) GetContainerByID

func (e *Engine) GetContainerByID(id string) (*engine.Container, error)

func (*Engine) GetContainerIPAddress

func (e *Engine) GetContainerIPAddress(id string) (string, error)

func (*Engine) GetContainerMicroserviceUUID

func (e *Engine) GetContainerMicroserviceUUID(c engine.Container) string

func (*Engine) GetContainerName

func (e *Engine) GetContainerName(c engine.Container) string

func (*Engine) GetContainerSandboxID

func (e *Engine) GetContainerSandboxID(id string) (string, error)

func (*Engine) GetContainerStartedAt

func (e *Engine) GetContainerStartedAt(id string) (int64, error)

func (*Engine) GetContainerStats

func (e *Engine) GetContainerStats(id string) (*engine.ContainerStats, error)

func (*Engine) GetContainerStatus

func (e *Engine) GetContainerStatus(id, uuid string) (*models.MicroserviceStatus, error)

func (*Engine) GetExecSessionExitCode

func (e *Engine) GetExecSessionExitCode(execID string) (int, error)

func (*Engine) GetExecSessionStatus

func (e *Engine) GetExecSessionStatus(execID string) (bool, error)

func (*Engine) GetRunningContainers

func (e *Engine) GetRunningContainers() ([]engine.Container, error)

func (*Engine) Init

func (e *Engine) Init(cfg engine.EngineConfig) error

Init connects to the Podman socket. If cfg.SocketURL is empty it auto-detects the Podman socket by trying the root socket and the rootless socket in order.

func (*Engine) InspectContainerRaw

func (e *Engine) InspectContainerRaw(containerID string) (map[string]any, error)

func (*Engine) KillContainer

func (e *Engine) KillContainer(id string) error

func (*Engine) ListImages

func (e *Engine) ListImages(ctx context.Context) ([]engine.ImageInfo, error)

func (*Engine) LoadImageFromPath

func (e *Engine) LoadImageFromPath(ctx context.Context, archivePath string) ([]engine.LoadedImage, error)

func (*Engine) PruneContainers

func (e *Engine) PruneContainers(ctx context.Context) (*engine.ContainerPruneReport, error)

func (*Engine) PruneDangling

func (e *Engine) PruneDangling(ctx context.Context) (*engine.ImagePruneReport, error)

func (*Engine) PruneImages

func (e *Engine) PruneImages() error

func (*Engine) PruneVolumes

func (e *Engine) PruneVolumes(ctx context.Context) (*engine.VolumePruneReport, error)

func (*Engine) PullImage

func (e *Engine) PullImage(ref string, reg *models.Registry, opts *engine.PullImageOptions) error

func (*Engine) RemoveContainer

func (e *Engine) RemoveContainer(id string, v bool) error

func (*Engine) RemoveImage

func (e *Engine) RemoveImage(ref string) error

func (*Engine) RemoveNamedVolume

func (e *Engine) RemoveNamedVolume(ctx context.Context, name string) error

func (*Engine) ResizeExecSession

func (e *Engine) ResizeExecSession(execID string, cols, rows uint32) error

func (*Engine) StartContainer

func (e *Engine) StartContainer(id string) error

func (*Engine) StartExecSession

func (e *Engine) StartExecSession(execID string, stdin io.Reader, stdout, stderr io.Writer) error

func (*Engine) StopContainer

func (e *Engine) StopContainer(id string) error

func (*Engine) StopExecSession

func (e *Engine) StopExecSession(execID string) error

func (*Engine) TailContainerLogs

func (e *Engine) TailContainerLogs(id, sid, uuid string, h engine.LogTailHandler, cfg *engine.TailConfig) error

Jump to

Keyboard shortcuts

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