convert

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

README

umoci/oci/config/convert

One fairly important aspect of creating a runtime bundle is the configuration of the container. While an image configuration and runtime configuration are defined on different levels (images are far more platform agnostic than runtime bundles), conversion from an image to a runtime configuration is defined as part of the OCI specification (thanks to this reference implementation).

This package implements a fairly unopinionated implementation of that conversion, allowing consumers to easily add their own extensions in the runtime configuration generation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Example added in v0.4.6

func Example() rspec.Spec

Example returns an example spec file, used as a "good sane default". XXX: Really we should just use runc's directly.

func MutateRuntimeSpec

func MutateRuntimeSpec(spec *rspec.Spec, rootfs string, image ispec.Image) error

MutateRuntimeSpec mutates a given runtime configuration with the image configuration provided.

func ToRootless added in v0.4.6

func ToRootless(spec *rspec.Spec) error

ToRootless converts a specification to a version that works with rootless containers. This is done by removing options and other settings that clash with unprivileged user namespaces.

func ToRuntimeSpec

func ToRuntimeSpec(rootfs string, image ispec.Image) (rspec.Spec, error)

ToRuntimeSpec converts the given OCI image configuration to a runtime configuration appropriate for use, which is templated on the default configuration specified by the OCI runtime-tools. It is equivalent to MutateRuntimeSpec("runtime-tools/generate".New(), image).Spec().

Types

This section is empty.

Jump to

Keyboard shortcuts

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