oci

package
v0.0.0-...-d9a4231 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TailNullArgs = "tail -f /dev/null"
	PingSelfCmd  = "cmd.exe /c ping -t 127.0.0.1"

	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 AsHostProcessContainer

func AsHostProcessContainer() ctrdoci.SpecOpts

AsHostProcessContainer updates the spec to create a HostProcess container.

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 DefaultWindowsSpecOpts

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

func HostProcessInheritUser

func HostProcessInheritUser() ctrdoci.SpecOpts

HostProcessInheritUser updates the spec to allow the HostProcess container to inherit the current user's token.

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