package specialimage
import "github.com/dotcloud/docker/internal/testutils/specialimage"
Index ¶
- func ConfigTarget(dir string) (*ocispec.Index, error)
- func Dangling(dir string) (*ocispec.Index, error)
- func EmptyFS(dir string) (*ocispec.Index, error)
- func EmptyIndex(dir string) (*ocispec.Index, error)
- func LegacyManifest(dir string, imageRef string, mfstDesc ocispec.Descriptor) error
- func Load(ctx context.Context, t *testing.T, apiClient client.APIClient, imageFunc SpecialImageFunc) string
- func MultiLayer(dir string) (*ocispec.Index, error)
- func MultiLayerCustom(dir string, imageRef string, layers []SingleFileLayer) (*ocispec.Index, error)
- func MultiPlatform(dir string, imageRef string, imagePlatforms []ocispec.Platform) (*ocispec.Index, []ocispec.Descriptor, error)
- func PartialMultiPlatform(dir string, imageRef string, opts PartialOpts) (*ocispec.Index, []ocispec.Descriptor, error)
- func RandomSinglePlatform(dir string, platform ocispec.Platform, source rand.Source) (*ocispec.Index, error)
- func TextPlain(dir string) (*ocispec.Index, error)
- func TwoPlatform(dir string) (*ocispec.Index, error)
- type FileInLayer
- type PartialOpts
- type SingleFileLayer
- type SpecialImageFunc
Functions ¶
func ConfigTarget ¶
ConfigTarget creates an image index with an image config being used as an image target instead of a manifest or index.
func Dangling ¶
Dangling creates an image with no layers and no tag. It also has an extra org.mobyproject.test.specialimage=1 label set. Layout: OCI.
func EmptyFS ¶
EmptyFS builds an image with an empty rootfs. Layout: Legacy Docker Archive See https://github.com/docker/docker/pull/5262 and also https://github.com/docker/docker/issues/4242
func EmptyIndex ¶
EmptyIndex creates an image index with no manifests. This is equivalent to `tianon/scratch:index`.
func LegacyManifest ¶
func LegacyManifest(dir string, imageRef string, mfstDesc ocispec.Descriptor) error
func Load ¶
func Load(ctx context.Context, t *testing.T, apiClient client.APIClient, imageFunc SpecialImageFunc) string
func MultiLayer ¶
func MultiLayerCustom ¶
func MultiLayerCustom(dir string, imageRef string, layers []SingleFileLayer) (*ocispec.Index, error)
func MultiPlatform ¶
func MultiPlatform(dir string, imageRef string, imagePlatforms []ocispec.Platform) (*ocispec.Index, []ocispec.Descriptor, error)
func PartialMultiPlatform ¶
func PartialMultiPlatform(dir string, imageRef string, opts PartialOpts) (*ocispec.Index, []ocispec.Descriptor, error)
PartialMultiPlatform creates an index with all platforms in storedPlatforms and missingPlatforms. However, only the blobs of the storedPlatforms are created and stored, while the missingPlatforms are only referenced in the index.
func RandomSinglePlatform ¶
func RandomSinglePlatform(dir string, platform ocispec.Platform, source rand.Source) (*ocispec.Index, error)
func TextPlain ¶
TextPlain creates an non-container image that only contains a text/plain blob.
func TwoPlatform ¶
Types ¶
type FileInLayer ¶
type PartialOpts ¶
type SingleFileLayer ¶
type SpecialImageFunc ¶
Source Files ¶
configtarget.go dangling.go emptyfs.go emptyindex.go load.go multilayer.go multiplatform.go partial.go random.go textplain.go twoplatform.go
- Version
- v28.1.1+incompatible (latest)
- Published
- Apr 18, 2025
- Platform
- linux/amd64
- Imports
- 21 packages
- Last checked
- 1 hour ago –
Tools for package owners.