podman

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeRegistryAuth added in v0.4.1

func DecodeRegistryAuth(authBase64 string) (*registry.AuthConfig, error)

func ToMount

func ToMount(v *types.Volume) spec.Mount

func ToMounts

func ToMounts(volumes []types.Volume) []spec.Mount

Types

type CustomReadCloser

type CustomReadCloser struct {
	*bytes.Reader
}

CustomReadCloser wraps a bytes.Reader to implement io.ReadCloser.

func (CustomReadCloser) Close

func (CustomReadCloser) Close() error

Close is a no-op method to satisfy the io.ReadCloser interface.

type PodmanManager

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

PodmanManager is a struct that implements the ContainerManager interface

func NewPodmanManager

func NewPodmanManager() (*PodmanManager, error)

NewPodmanManager returns a new PodmanManager

func (*PodmanManager) BuildImage

func (p *PodmanManager) BuildImage(ctx context.Context, dockerfile []byte, imageName string, platform string) (io.ReadCloser, error)

BuildImage builds an image

func (*PodmanManager) BuildMultiArchImage

func (p *PodmanManager) BuildMultiArchImage(ctx context.Context, dockerfile []byte, dockerCtx *bytes.Buffer, imageName string, platforms []string, _ string) (io.ReadCloser, []string, error)

BuildImage builds an image

func (*PodmanManager) CommitContainer

func (p *PodmanManager) CommitContainer(ctx context.Context, containerID string, opts types.CommitOptions) (string, error)

CommitContainer commits a container

func (*PodmanManager) ContainerList

func (p *PodmanManager) ContainerList(ctx context.Context, all bool) ([]*types.Container, error)

ContainerList lists containers

func (*PodmanManager) ContainerLogs

func (p *PodmanManager) ContainerLogs(ctx context.Context, id string, ShowStdout bool, ShowStderr bool, Follow bool) (io.ReadCloser, error)

ContainerLogs gets container logs

func (*PodmanManager) CopyContentToContainer

func (p *PodmanManager) CopyContentToContainer(ctx context.Context, id, content, dest string) error

CopyContentToContainer copies content to a container

func (*PodmanManager) CopyDirectorToContainer

func (p *PodmanManager) CopyDirectorToContainer(ctx context.Context, id, srcPath, dstPath string) error

CopyDirectorToContainer copies a directory to a container

func (*PodmanManager) CopyFileFromContainer

func (p *PodmanManager) CopyFileFromContainer(ctx context.Context, id string, srcPath string) (string, error)

CopyFileFromContainer copies a file from a container

func (*PodmanManager) CopyToContainer

func (p *PodmanManager) CopyToContainer(ctx context.Context, id, srcPath, dstPath string) error

CopyToContainer copies to a container

func (*PodmanManager) CreateContainer

func (p *PodmanManager) CreateContainer(ctx context.Context, opts *types.ContainerConfig, authBase64 string) (string, error)

CreateContainer creates a container

func (*PodmanManager) ExecContainer

func (p *PodmanManager) ExecContainer(ctx context.Context, id string, cmd []string, attachStdOut bool) (io.Reader, error)

ExecContainer executes a container

func (*PodmanManager) InspectContainer

func (p *PodmanManager) InspectContainer(ctx context.Context, id string) (*types.ContainerConfig, error)

InspectContainer inspects a container

func (*PodmanManager) InspectImage

func (p *PodmanManager) InspectImage(ctx context.Context, image string) (*types.ImageInfo, error)

func (*PodmanManager) ListImage

func (p *PodmanManager) ListImage(ctx context.Context, image string) ([]string, error)

ListImage lists images

func (*PodmanManager) Name

func (d *PodmanManager) Name() string

func (*PodmanManager) PullImage

func (p *PodmanManager) PullImage(ctx context.Context, image string, authBase64 string, platform string) (io.ReadCloser, error)

PullImage pulls an image

func (*PodmanManager) PushImage

func (p *PodmanManager) PushImage(ctx context.Context, target string, authBase64 string) (io.ReadCloser, error)

PushImage pushes an image

func (*PodmanManager) RemoveContainer

func (p *PodmanManager) RemoveContainer(ctx context.Context, containerID string) error

RemoveContainer removes a container

func (*PodmanManager) RemoveImage

func (p *PodmanManager) RemoveImage(ctx context.Context, target string) error

RemoveImage removes an image

func (*PodmanManager) StartContainer

func (p *PodmanManager) StartContainer(ctx context.Context, id string) error

StartContainer starts a container

func (*PodmanManager) StopContainer

func (p *PodmanManager) StopContainer(ctx context.Context, id string, signal string) error

StopContainer stops a container

func (*PodmanManager) TagImage

func (p *PodmanManager) TagImage(ctx context.Context, source, target string) error

TagImage tags an image

func (*PodmanManager) WaitContainer

func (p *PodmanManager) WaitContainer(ctx context.Context, id string, waitCondition string) (*int64, error)

WaitContainer waits for a container

Jump to

Keyboard shortcuts

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