convert

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: Apache-2.0 Imports: 8 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 (or rather will be) defined as part of the OCI specification.

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 MutateRuntimeSpec

func MutateRuntimeSpec(g rgen.Generator, rootfs string, image ispec.Image, manifest ispec.Manifest) error

MutateRuntimeSpec mutates a given runtime specification generator with the image configuration provided. It returns the original generator, and does not modify any fields directly (to allow for chaining).

XXX: This conversion is not actually defined by the image-spec. There is a

proposal in-the-works though. https://github.com/opencontainers/image-spec/pull/492

func ToRuntimeSpec

func ToRuntimeSpec(rootfs string, image ispec.Image, manifest ispec.Manifest) (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