Documentation ¶
Index ¶
- Constants
- Variables
- func CreateLayout(imagePath string) (casext.Engine, error)
- func GenerateBundleManifest(mtreeName string, bundlePath string, fsEval mtree.FsEval) error
- func OpenLayout(imagePath string) (casext.Engine, error)
- func ParseIdmapOptions(meta *Meta, ctx *cli.Context) error
- func WriteBundleMeta(bundle string, meta Meta) error
- type ManifestStat
- type Meta
Constants ¶
const MetaName = "umoci.json"
MetaName is the name of umoci's metadata file that is stored in all bundles extracted by umoci.
const MetaVersion = "2"
MetaVersion is the version of Meta supported by this code. The value is only bumped for updates which are not backwards compatible.
Variables ¶
var MtreeKeywords = []mtree.Keyword{
"size",
"type",
"uid",
"gid",
"mode",
"link",
"nlink",
"tar_time",
"sha256digest",
"xattr",
}
MtreeKeywords is the set of keywords used by umoci for verification and diff generation of a bundle. This is based on mtree.DefaultKeywords, but is hardcoded here to ensure that vendor changes don't mess things up.
Functions ¶
func CreateLayout ¶ added in v0.4.2
CreateLayout creates an existing OCI image layout, and fails if it already exists.
func GenerateBundleManifest ¶ added in v0.4.2
GenerateBundleManifest creates and writes an mtree of the rootfs in the given bundle path, using the supplied fsEval method
func OpenLayout ¶ added in v0.4.2
OpenLayout opens an existing OCI image layout, and fails if it does not exist.
func ParseIdmapOptions ¶ added in v0.4.2
ParseIdmapOptions sets up the mapping options for Meta, using the arguments specified on the command line
func WriteBundleMeta ¶ added in v0.4.2
WriteBundleMeta writes an umoci.json file to the given bundle path.
Types ¶
type ManifestStat ¶ added in v0.4.2
type ManifestStat struct {
// History stores the history information for the manifest.
History []historyStat `json:"history"`
}
ManifestStat has information about a given OCI manifest. TODO: Implement support for manifest lists, this should also be able to
contain stat information for a list of manifests.
func Stat ¶ added in v0.4.2
func Stat(ctx context.Context, engine casext.Engine, manifestDescriptor ispec.Descriptor) (ManifestStat, error)
Stat computes the ManifestStat for a given manifest blob. The provided descriptor must refer to an OCI Manifest.
func (ManifestStat) Format ¶ added in v0.4.2
func (ms ManifestStat) Format(w io.Writer) error
Format formats a ManifestStat using the default formatting, and writes the result to the given writer. TODO: This should really be implemented in a way that allows for users to
define their own custom templates for different blocks (meaning that this should use text/template rather than using tabwriters manually.
type Meta ¶ added in v0.4.2
type Meta struct { // Version is the version of umoci used to unpack the bundle. This is used // to future-proof the umoci.json information. Version string `json:"umoci_version"` // From is a copy of the descriptor pointing to the image manifest that was // used to unpack the bundle. Essentially it's a resolved form of the // --image argument to umoci-unpack(1). From casext.DescriptorPath `json:"from_descriptor_path"` // MapOptions is the parsed version of --uid-map, --gid-map and --rootless // arguments to umoci-unpack(1). While all of these options technically do // not need to be the same for corresponding umoci-unpack(1) and // umoci-repack(1) calls, changing them is not recommended and so the // default should be that they are the same. MapOptions layer.MapOptions `json:"map_options"` }
Meta represents metadata about how umoci unpacked an image to a bundle and other similar information. It is used to keep track of information that is required when repacking an image and other similar bundle information.
func ReadBundleMeta ¶ added in v0.4.2
ReadBundleMeta reads and parses the umoci.json file from a given bundle path.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package mutate implements various functionality to allow for the modification of container images in a much higher-level fashion than available from github.com/openSUSE/umoci/oci/cas.
|
Package mutate implements various functionality to allow for the modification of container images in a much higher-level fashion than available from github.com/openSUSE/umoci/oci/cas. |
oci
|
|
casext
Package casext provides extensions to the standard cas.Engine interface, allowing for generic functionality to be used on top of any implementation of cas.Engine.
|
Package casext provides extensions to the standard cas.Engine interface, allowing for generic functionality to be used on top of any implementation of cas.Engine. |
pkg
|
|
third_party
|
|