convert

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 10 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 MutateRuntimeSpec

func MutateRuntimeSpec(g rgen.Generator, rootfs string, image ispec.Image) 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).

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