oci

package
v0.0.0-...-adfc9c0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TailNullArgs = "tail -f /dev/null"

	DefaultNamespace = namespaces.Default
	CRINamespace     = criconstants.K8sContainerdNamespace

	HostnameEnv = "HOSTNAME"
)

Variables

View Source
var DefaultUnixEnv = []string{
	"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
}

Functions

func CreateLinuxSpec

func CreateLinuxSpec(ctx context.Context, tb testing.TB, id string, opts ...ctrdoci.SpecOpts) *specs.Spec

CreateLinuxSpec returns the OCI spec for a Linux container.

See CreateSpecWithPlatform for more details.

func CreateSpecWithPlatform

func CreateSpecWithPlatform(ctx context.Context, tb testing.TB, plat, id string, opts ...ctrdoci.SpecOpts) *specs.Spec

CreateSpecWithPlatform returns the OCI spec for the specified platform. The context must contain a containerd namespace added by github.com/containerd/containerd/namespaces.WithNamespace.

func CreateWindowsSpec

func CreateWindowsSpec(ctx context.Context, tb testing.TB, id string, opts ...ctrdoci.SpecOpts) *specs.Spec

CreateWindowsSpec returns the OCI spec for a Windows container.

See CreateSpecWithPlatform for more details.

func DefaultLinuxSpec

func DefaultLinuxSpec(ctx context.Context, tb testing.TB, nns string) *specs.Spec

DefaultLinuxSpec returns a default OCI spec for a Linux container.

See CreateSpecWithPlatform for more details.

func DefaultLinuxSpecOpts

func DefaultLinuxSpecOpts(nns string, extra ...ctrdoci.SpecOpts) []ctrdoci.SpecOpts

func LinuxImageConfig

func LinuxImageConfig(entry, cmd []string, wd string) *imagespec.ImageConfig

func LinuxSandboxImageConfig

func LinuxSandboxImageConfig(pause bool) *imagespec.ImageConfig

func LinuxSandboxRuntimeConfig

func LinuxSandboxRuntimeConfig(name string) *runtime.PodSandboxConfig

func LinuxWorkloadImageConfig

func LinuxWorkloadImageConfig() *imagespec.ImageConfig

func LinuxWorkloadRuntimeConfig

func LinuxWorkloadRuntimeConfig(name string, cmd, args []string, wd string) *runtime.ContainerConfig

func WithWindowsLayerFolders

func WithWindowsLayerFolders(layers []string) ctrdoci.SpecOpts

Types

This section is empty.

Jump to

Keyboard shortcuts

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