Documentation ¶
Index ¶
Constants ¶
View Source
const ImageVersion = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct { Version int `json:"version"` ImageConfig v1.ImageConfig `json:"image-config"` Layers []Layer `json:"layers"` Arch string `json:"arch"` }
Image represent the JSON image file produced by nix2container. This JSON file can then be used by the Skopeo Nix transport to actually build the container image.
type Layer ¶
type Layer struct { Digest string `json:"digest"` Size int64 `json:"size"` DiffIDs string `json:"diff_ids"` Paths Paths `json:"paths,omitempty"` // OCI mediatype // https://github.com/opencontainers/image-spec/blob/8b9d41f48198a7d6d0a5c1a12dc2d1f7f47fc97f/specs-go/v1/mediatype.go MediaType string `json:"mediatype"` LayerPath string `json:"layer-path,omitempty"` }
func NewLayersFromFile ¶
type Path ¶
type Path struct { Path string `json:"path"` Options *PathOptions `json:"options,omitempty"` }
type PathOptions ¶
type RewritePath ¶
type RewritePath struct { Path string `json:"path"` Regex string `json:"regex"` Repl string `json:"repl"` }
RewritePath describes how to replace the Regex in Path by the replacement Repl.
This allows to rewrite storepaths during the tar operation. This is mainly used to move storepaths from the /nix/store to / in the image.
Click to show internal directories.
Click to hide internal directories.