Registry may not support Image Manifest Version 2, Schema 2
at com.google.cloud.tools.jib.registry.RegistryErrorExceptionBuilder.build(RegistryErrorExceptionBuilder.java:108)
at com.google.cloud.tools.jib.registry.ManifestPusher.handleHttpResponseException(ManifestPusher.java:119)
at com.google.cloud.tools.jib.registry.ManifestPusher.handleHttpResponseException(ManifestPusher.java:39)
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call(RegistryEndpointCaller.java:258)
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.fallBackToHttp(RegistryEndpointCaller.java:210)
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.callWithAllowInsecureRegistryHandling(RegistryEndpointCaller.java:180)
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call(RegistryEndpointCaller.java:161)
at com.google.cloud.tools.jib.registry.RegistryClient.callRegistryEndpoint(RegistryClient.java:356)
at com.google.cloud.tools.jib.registry.RegistryClient.pushManifest(RegistryClient.java:225)
at com.google.cloud.tools.jib.builder.steps.PushImageStep.lambda$afterAllPushed$0(PushImageStep.java:162)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.google.api.client.http.HttpResponseException: 400 Bad Request
{"errors":[{"code":"MANIFEST_INVALID","message":"manifest invalid","detail":{}}]}
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1102)
at com.google.cloud.tools.jib.http.Connection.send(Connection.java:200)
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call(RegistryEndpointCaller.java:251)
... 12 more
What registry are you trying to build to?
Probably a duplicate of #601?
maven jib-maven-plugin version 1.1.1 format OCI
Registry may not support Image Manifest Version 2, Schema 2
format OCI
Perhaps you are a bit confused between the OCI manifest and the Docker Manifest V2.2.
The OCI manifest is of media type application/vnd.oci.image.manifest.v1+json, while the Docker Image Manifest Version 2, Schema 2 is of type application/vnd.docker.distribution.manifest.v2+json.
So, it could be simply that the registry does not support OCI.
What registry are you trying to build to? (For example, Docker Hub, Quay, private Harbor, etc.)
private Harbor registry v1.7.4
Harbor registry does not support OCI.
format Docker BUILD SUCCESS
I can push to Harbor registry v1.7.4 by manual (format OCI) and running docker image
but can't push by maven jib-maven-plugin version 1.1.1 format OCI
Harbor registry does not support OCI.
If Harbor does not support OCI, you probably shouldn't have <format>OCI</format> in the Jib configuration.
I can push to Harbor registry v1.7.4 by manual (format OCI) and running docker image
Whatever manual methods or tools you use, my guess is that the initial OCI manifest is converted to Docker manifest at some point before the image is pushed to Harbor. I guess Harbor will just return INVALID_MANIFEST if gets an OCI manifest.
So, if you want to make Jib push to Harbor that doesn't support OCI, I think you should remove <format>OCI. We don't intend to automatically creating a Docker manifest when <format>OCI is specified and the registry doesn't accept it.
I had the same with Quay.io. It supports Docker, but not OCI format. When I have format = 'OCI' in build.gradle and try to build using gradle jib, I get the misleading message Registry may not support Image Manifest Version 2, Schema 2. With format = 'Docker' everything works fine after you are whitelisted by Quay for V2.2 support.
Can we make the error message more useful like Registry may not support Image Manifest Version 2, Schema 2 or container image format ${format}?
Ah, "Registry may not support Image Manifest Version 2, Schema 2" was a message coming from Jib. Yeah, the error message is misleading when format = 'OCI'. We need to improve the message.
Reopening, to track updating the misleading error message in the case of OCI push.