containerd

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateOCITarToDockerV1Tar

func MigrateOCITarToDockerV1Tar(dir, tarName string) error

fileuploader specific

Types

type Containerd

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

func New

func New(host string) *Containerd

New instantiates a new Containerd runtime object

func (Containerd) ExtractFileSystem

func (c Containerd) ExtractFileSystem(imageTarPath string, outputTarPath string, imageName string, socketPath string) error

ExtractFileSystem Extract the file system from tar of an image by creating a temporary dormant container instance

func (Containerd) ExtractFileSystemContainer

func (c Containerd) ExtractFileSystemContainer(containerId string, namespace string, outputTarPath string, socketPath string) error

ExtractFileSystemContainer Extract the file system of an existing container to tar

func (Containerd) ExtractImage

func (c Containerd) ExtractImage(imageID, imageName, path string) error

ExtractImage will create the tarball from the containerd image, extracts into dir and then skopeo is used to migrate oci layers using the dir to docker v1 layer spec format tar and again extracts back to dir example: skopeo copy oci:///home/ubuntu/img/docker/threatmapper_containerd-dir \ docker-archive:/home/ubuntu/img/docker/threatmapper_containerd.tar

func (Containerd) GetImageID

func (c Containerd) GetImageID(imageName string) ([]byte, error)

GetImageID returns the image id

func (Containerd) GetSocket

func (c Containerd) GetSocket() string

GetSocket is socket getter

func (Containerd) Save

func (c Containerd) Save(imageName, outputParam string) ([]byte, error)

Save just saves image using -o flag

Jump to

Keyboard shortcuts

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