docker/compose · error
%s is not a compose project OCI artifact, but %s
Error message
%s is not a compose project OCI artifact, but %s
What it means
pullComposeFiles validates the fetched manifest before extracting layers: either manifest.ArtifactType is set and must equal oci.ComposeProjectArtifactType, or — when it is empty — manifest.Config.MediaType must be the compose empty-config media type. Anything else means the manifest is not a compose project artifact, and the message reports the ref and the offending artifact type.
Source
Thrown at pkg/remote/oci.go:208
}
}
g.known[path] = local
}
return filepath.Join(local, "compose.yaml"), nil
}
func (g *ociRemoteLoader) Dir(path string) string {
return g.known[path]
}
func (g *ociRemoteLoader) pullComposeFiles(ctx context.Context, local string, manifest spec.Manifest, ref reference.Named, resolver remotes.Resolver) error {
err := os.MkdirAll(local, 0o700)
if err != nil {
return err
}
if (manifest.ArtifactType != "" && manifest.ArtifactType != oci.ComposeProjectArtifactType) ||
(manifest.ArtifactType == "" && manifest.Config.MediaType != oci.ComposeEmptyConfigMediaType) {
return fmt.Errorf("%s is not a compose project OCI artifact, but %s", ref.String(), manifest.ArtifactType)
}
for i, layer := range manifest.Layers {
content, err := oci.GetBlob(ctx, resolver, ref, layer)
if err != nil {
return err
}
switch layer.MediaType {
case oci.ComposeYAMLMediaType:
if err := writeComposeFile(layer, i, local, content); err != nil {
return err
}
case oci.ComposeEnvFileMediaType:
if err := writeEnvFile(layer, local, content); err != nil {
return err
}
case oci.ComposeEmptyConfigMediaType:View on GitHub (pinned to ddc4b044b6)
Solutions
- Inspect the manifest (`docker buildx imagetools inspect <ref> --raw`) and check artifactType/config.mediaType against what docker compose publishes.
- Re-push the resource as a compose bundle with `docker compose push` from a supported compose version so the correct artifact/config types are set.
- If the resource is a normal image, stop using it via oci:// in -f and reference it as a service image instead.
Defensive patterns
Strategy: validation
Validate before calling
// when building bundles yourself, assert the manifest type before publishing
if manifest.ArtifactType != "" && manifest.ArtifactType != ComposeProjectArtifactType {
return fmt.Errorf("refusing to publish %q as a compose bundle", manifest.ArtifactType)
} Prevention
- Build compose bundles only with supported compose versions so artifact/config types are correct.
- When hand-assembling bundles with oras/crane, set artifactType to the compose project type or the config media type to the compose empty-config type.
- Inspect manifests with buildx imagetools before distributing.
When it happens
Trigger: A manifest whose ArtifactType is a foreign value (e.g. application/vnd.example.something) or whose config media type is a normal image config (application/vnd.oci.image.config.v1+json) when ArtifactType is empty. Reached when the top-level descriptor is a single manifest (not an index), or after fetching the compose-flagged manifest from an index.
Common situations: Pointing compose at a plain container image manifest rather than a bundle; bundles produced by non-docker tooling that uses its own artifact types; partially migrated images that have a compose layer but standard config media type.
Related errors
- OCI index %s doesn't refer to compose artifacts
- missing annotation com.docker.compose.envfile in layer %q
- invalid digest %s: %w
- OCI remote resource is disabled by %q
- failed to pull OCI resource %q: %w
AI-assisted analysis of docker/compose@ddc4b044b6 (2026-08-15).
Data as JSON: /api/errors/963a822b43075972.
Report an issue: GitHub.