dockermedia

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package dockermedia lets OCI tooling read images that use Docker V2 media types. Images built by `docker build` use those types, and both the agent and metalman unpack such images.

Index

Constants

View Source
const (
	ManifestType     = "application/vnd.docker.distribution.manifest.v2+json"
	ManifestListType = "application/vnd.docker.distribution.manifest.list.v2+json"
	ConfigType       = "application/vnd.docker.container.image.v1+json"
	LayerType        = "application/vnd.docker.image.rootfs.diff.tar"
	LayerGzipType    = "application/vnd.docker.image.rootfs.diff.tar.gzip"
	ForeignLayerType = "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip"
)

Docker V2 media types that are structurally compatible with OCI equivalents.

Variables

This section is empty.

Functions

func ConvertToOCI

func ConvertToOCI(m *ispec.Manifest)

ConvertToOCI rewrites Docker V2 media types in a manifest to their OCI equivalents in-place. Docker V2 and OCI blobs are structurally identical; only the MIME types differ. umoci's UnpackRootfs strictly checks for OCI media types, so this conversion is required when pulling images produced by `docker build`.

func RegisterParsers

func RegisterParsers()

RegisterParsers registers umoci media-type parsers for Docker V2 media types so that umoci's FromDescriptor returns parsed Go structs (ispec.Manifest, ispec.Index, ispec.Image) instead of raw readers.

Docker V2 manifests and manifest lists are structurally compatible with their OCI counterparts, so simple JSON decoding into the OCI types is sufficient.

This function is safe to call multiple times; registration happens only once.

Types

This section is empty.

Jump to

Keyboard shortcuts

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