libocispec

package
v0.0.0-...-4c2500c Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSpec

func GenerateSpec(opts ...SpecOpts) (*specs.Spec, error)

GenerateSpec will generate a default spec from the provided image for use as a containerd container

func WithHostHosts

func WithHostHosts(s *specs.Spec) error

func WithHostLocaltime

func WithHostLocaltime(s *specs.Spec) error

func WithHostResoveconf

func WithHostResoveconf(s *specs.Spec) error

func WithNoNewPrivileges

func WithNoNewPrivileges(s *specs.Spec) error

WithNoNewPrivileges sets no_new_privileges on the process for the container

func WithTTY

func WithTTY(s *specs.Spec) error

Types

type SpecOpts

type SpecOpts func(s *specs.Spec) error

SpecOpts sets spec specific information to a newly generated OCI spec

func WithHostNamespace

func WithHostNamespace(ns specs.LinuxNamespaceType) SpecOpts

func WithLinuxNamespace

func WithLinuxNamespace(ns specs.LinuxNamespace) SpecOpts

WithLinuxNamespace uses the passed in namespace for the spec. If a namespace of the same type already exists in the spec, the existing namespace is replaced by the one provided.

func WithProcessArgs

func WithProcessArgs(args ...string) SpecOpts

WithProcessArgs replaces the args on the generated spec

func WithRootFSPath

func WithRootFSPath(path string, readonly bool) SpecOpts

WithRootFSPath specifies unmanaged rootfs path.

func WithUserNamespace

func WithUserNamespace(container, host, size uint32) SpecOpts

WithUserNamespace sets the uid and gid mappings for the task this can be called multiple times to add more mappings to the generated spec

Jump to

Keyboard shortcuts

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