slimtoolkit/slim · critical
dockerimage.LoadPackage: missing image config object for ima
Error message
dockerimage.LoadPackage: missing image config object for image ID=%s / archive='%s' / files=%+v
What it means
dockerimage.LoadPackage requires the image config object (the JSON config blob holding history, rootfs diff_ids, architecture, etc.). A nil pkg.Config means the config blob referenced by the manifest was not found or failed to parse in the archive, so loading aborts with the image ID, archive path, and file list.
Source
Thrown at pkg/docker/dockerimage/dockerimage.go:1130
}
}
}
}
if pkg.Format == FormatOCI {
if pkg.ManifestOCI == nil {
return nil, fmt.Errorf("dockerimage.LoadPackage: missing OCI Image Manifest object for image ID=%s / archive='%s' / files=%+v",
imageID, archivePath, archiveFiles)
}
} else {
if pkg.Manifest == nil {
return nil, fmt.Errorf("dockerimage.LoadPackage: missing manifest object for image ID=%s / archive='%s' / files=%+v",
imageID, archivePath, archiveFiles)
}
}
if pkg.Config == nil {
return nil, fmt.Errorf("dockerimage.LoadPackage: missing image config object for image ID=%s / archive='%s' / files=%+v",
imageID, archivePath, archiveFiles)
}
if len(layers) == 0 {
//todo: display non-image layer metadata if there are any
//todo: save non-image layer metadata/data
log.Debugf("dockerimage.LoadPackage: no image layers in archive - %s (%+v)",
archivePath, layerFileNames)
}
if len(nonLayerFileNames) > 0 {
log.Debugf("dockerimage.LoadPackage: non-image layers in archive - %s (%s)",
archivePath, jsonutil.ToString(nonLayerFileNames))
}
log.Debugf("dockerimage.LoadPackage: layerLocationSource=%v layerSequence='%#v' - archive='%s'",
layerLocationSource, layerSequence, archivePath)
View on GitHub (pinned to 81940d17fa)
Solutions
- Re-export the archive from the registry/daemon so the full config blob is included.
- Compare the manifest's config digest against the files list in the error and restore/rename the blob file to match the expected digest path.
- Validate the archive with a tool (skopeo inspect / crane config) before ingestion to confirm the config resolves.
Example fix
// before: config blob deleted during cleanup $ rm blobs/sha256/<config-digest> // after: keep full OCI layout intact $ crane pull --platform=linux/amd64 app:1.0 app.tar
Defensive patterns
Strategy: validation
Validate before calling
// cross-check manifest config digest against archive files before LoadPackage
func configBlobPresent(files []string, configDigest string) bool {
for _, f := range files {
if strings.Contains(f, configDigest) { return true }
}
return false
}
// sanity: crane config <archive-ref> should print the config JSON Type guard
func configLoaded(p *dockerimage.Package) bool { return p != nil && p.Config != nil } Try / catch
pkg, err := dockerimage.LoadPackage(...)
if err != nil && strings.Contains(err.Error(), "missing image config object") {
// re-export archive including the config blob
} Prevention
- Never prune blobs from OCI layouts unless you re-derive the manifests
- Pull complete images (layers + config) rather than selective blob fetches
- Run skopeo inspect / crane config as a pre-flight check
When it happens
Trigger: Loading an image archive where the config blob (OCI `configs/` entry or docker `<digest>.json` config) is missing, truncated, or its digest doesn't match the manifest's config reference when calling LoadPackage.
Common situations: Archives stripped of config blobs by cleanup tooling; digest mismatches after re-tagging blobs; interrupted pulls that fetched layers but not the config; registries/proxies serving partial manifests.
Related errors
- dockerimage.LoadPackage: missing OCI Image Manifest object f
- dockerimage.LoadPackage: missing layer (%v) for image ID - %
- dockerimage.LoadPackage: missing manifest object for image I
- dockerimage.LoadPackage: layer index mismatch - %v / %v
- dockerimage.LoadPackage: layer path mismatch - %v / %v
AI-assisted analysis of slimtoolkit/slim@81940d17fa (2026-08-31).
Data as JSON: /api/errors/5480647e05ce79b5.
Report an issue: GitHub.