Versions in this module Expand all Collapse all v1 v1.4.4 Mar 5, 2021 Changes in this version + var ErrNoShmMount = errors.New("no /dev/shm mount specified") + var ErrNotADevice = errors.New("not a device node") + var WithAllCapabilities = func(ctx context.Context, client Client, c *containers.Container, s *Spec) error + var WithPrivileged = Compose(WithAllCapabilities, WithMaskedPaths(nil), WithReadonlyPaths(nil), ...) + func ApplyOpts(ctx context.Context, client Client, c *containers.Container, s *Spec, ...) error + func GetAllCapabilities() []string + func WithAllDevicesAllowed(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithDefaultPathEnv(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithDefaultUnixDevices(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithHostDevices(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithHostHostsFile(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithHostLocaltime(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithHostResolvconf(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithNewPrivileges(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithNoNewPrivileges(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithParentCgroupDevices(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithSeccompUnconfined(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithTTY(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithWindowsHyperV(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithWriteableCgroupfs(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + func WithWriteableSysfs(_ context.Context, _ Client, _ *containers.Container, s *Spec) error + type Client interface + SnapshotService func(snapshotterName string) snapshots.Snapshotter + type Image interface + Config func(ctx context.Context) (ocispec.Descriptor, error) + ContentStore func() content.Store + type Spec = specs.Spec + func GenerateSpec(ctx context.Context, client Client, c *containers.Container, opts ...SpecOpts) (*Spec, error) + func GenerateSpecWithPlatform(ctx context.Context, client Client, platform string, c *containers.Container, ...) (*Spec, error) + type SpecOpts func(context.Context, Client, *containers.Container, *Spec) error + func Compose(opts ...SpecOpts) SpecOpts + func WithAddedCapabilities(caps []string) SpecOpts + func WithAdditionalGIDs(userstr string) SpecOpts + func WithAmbientCapabilities(caps []string) SpecOpts + func WithAnnotations(annotations map[string]string) SpecOpts + func WithApparmorProfile(profile string) SpecOpts + func WithCPUCFS(quota int64, period uint64) SpecOpts + func WithCPUShares(shares uint64) SpecOpts + func WithCPUs(cpus string) SpecOpts + func WithCPUsMems(mems string) SpecOpts + func WithCapabilities(caps []string) SpecOpts + func WithCgroup(path string) SpecOpts + func WithDefaultSpec() SpecOpts + func WithDefaultSpecForPlatform(platform string) SpecOpts + func WithDevShmSize(kb int64) SpecOpts + func WithDroppedCapabilities(caps []string) SpecOpts + func WithEnv(environmentVariables []string) SpecOpts + func WithEnvFile(path string) SpecOpts + func WithHostNamespace(ns specs.LinuxNamespaceType) SpecOpts + func WithHostname(name string) SpecOpts + func WithImageConfig(image Image) SpecOpts + func WithImageConfigArgs(image Image, args []string) SpecOpts + func WithLinuxDevice(path, permissions string) SpecOpts + func WithLinuxDevices(devices []specs.LinuxDevice) SpecOpts + func WithLinuxNamespace(ns specs.LinuxNamespace) SpecOpts + func WithMaskedPaths(paths []string) SpecOpts + func WithMemoryLimit(limit uint64) SpecOpts + func WithMemorySwap(swap int64) SpecOpts + func WithMounts(mounts []specs.Mount) SpecOpts + func WithNamespacedCgroup() SpecOpts + func WithPidsLimit(limit int64) SpecOpts + func WithProcessArgs(args ...string) SpecOpts + func WithProcessCwd(cwd string) SpecOpts + func WithReadonlyPaths(paths []string) SpecOpts + func WithRootFSPath(path string) SpecOpts + func WithRootFSReadonly() SpecOpts + func WithSelinuxLabel(label string) SpecOpts + func WithSpecFromBytes(p []byte) SpecOpts + func WithSpecFromFile(filename string) SpecOpts + func WithTTYSize(width, height int) SpecOpts + func WithUIDGID(uid, gid uint32) SpecOpts + func WithUser(userstr string) SpecOpts + func WithUserID(uid uint32) SpecOpts + func WithUserNamespace(uidMap, gidMap []specs.LinuxIDMapping) SpecOpts + func WithUsername(username string) SpecOpts + func WithWindowNetworksAllowUnqualifiedDNSQuery() SpecOpts + func WithWindowsCPUCount(count uint64) SpecOpts + func WithWindowsIgnoreFlushesDuringBoot() SpecOpts