helm: OCI: Not able to push chart to
Output of helm version:
version.BuildInfo{Version:“v3.0.0-alpha.1”, GitCommit:“b9a54967f838723fe241172a6b94d18caf8bcdca”, GitTreeState:“clean”}
~ $ helm create dummy-chart
Creating dummy-chart
~ $ helm chart save dummy-chart registry.hub.docker.com/karuppiah7890/dummy-chart
Using default tag: latest
Name: dummy-chart
Version: 0.1.0
Meta: sha256:42603b382336019d658ec8c0c71c57be421dc49a471ce6c6b776d7834e54cbec
Content: sha256:2b41efbc14985cd820ef48a2e898ac839559f6b77fd2a49af29dd7d6c4c3004c
latest: saved
~ $ helm chart push registry.hub.docker.com/karuppiah7890/dummy-chart
Using default tag: latest
The push refers to repository [registry.hub.docker.com/karuppiah7890/dummy-chart]
Name: dummy-chart
Version: 0.1.0
Meta: sha256:42603b382336019d658ec8c0c71c57be421dc49a471ce6c6b776d7834e54cbec
Content: sha256:2b41efbc14985cd820ef48a2e898ac839559f6b77fd2a49af29dd7d6c4c3004c
Error: failed commit on ref "manifest-sha256:febab107d93e89faa3926f875441334358562220d47d48230346e9b51fd46500": un
expected status: 400 Bad Request
When I tried to debug, the response from Docker Hub said -
{"errors":[{"code":"MANIFEST_INVALID","message":"manifest invalid","detail":{}}]}
and digging more, I saw that the manifest json looks like this -
{
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"size": 2
},
"layers": [
{
"mediaType": "application/vnd.cncf.helm.chart.meta.v1+json",
"digest": "sha256:42603b382336019d658ec8c0c71c57be421dc49a471ce6c6b776d7834e54cbec",
"size": 106,
"annotations": {
"org.opencontainers.image.title": "chart-meta.json"
}
},
{
"mediaType": "application/vnd.cncf.helm.chart.content.v1+tar",
"digest": "sha256:2b41efbc14985cd820ef48a2e898ac839559f6b77fd2a49af29dd7d6c4c3004c",
"size": 2268,
"annotations": {
"org.opencontainers.image.title": "chart-content.tgz",
"sh.helm.chart.name": "dummy-chart",
"sh.helm.chart.version": "0.1.0"
}
}
]
}
and layers struct looks like this -
[{MediaType:application/vnd.cncf.helm.chart.meta.v1+json Digest:sha256:42603b382336019d658ec8c0c71c57be421dc49a471ce6c6b776d7834e54cbec Size:106 URLs:[] Annotations:map[org.opencontainers.image.title:chart-meta.json] Platform:<nil>} {MediaType:application/vnd.cncf.helm.chart.content.v1+tar Digest:sha256:2b41efbc14985cd820ef48a2e898ac839559f6b77fd2a49af29dd7d6c4c3004c Size:2268 URLs:[] Annotations:map[org.opencontainers.image.title:chart-content.tgz sh.helm.chart.name:dummy-chart sh.helm.chart.version:0.1.0] Platform:<nil>}]
And I tried the same by tagging the chart too, for example registry.hub.docker.com/karuppiah7890/dummy-chart:v1.0.0 and I still couldn’t push the chart.
Docker Hub API is OCI Spec compliant right? Am I missing something here?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 24 (10 by maintainers)
This works for me on GCR (Google Cloud Platform, Google Container Registry).
Here my steps:
There is still a problem. There was not a
tagassociated to the chart in the registry. I expectedlatest. I had to add the tag manually from the GCR dashboard to be able to do apulloperation.Also the final
:latestwas mandatory, the command would fail without it.In this comment time, neither docker.io or query.io can not use
helm chart pushcommand.Hi @zioproto, I tried to reproduce your steps and I have this error (like @guycla)
I have admin right access to my GCP project. And I’m successfully logged in GCR with docker login.
(helm v3.2.1)
Do you have any ideas ? 😃
Docker Hub is not currently supporting alternative content types at this time. Feel free to use one of the listed cloud providers that does support Helm’s content type.
Most cloud providers whitelist certain media types. Usually that means they only support docker images. The only two that we know that work at this time with
helm chart pushare Azure Container Registry and vanilla docker/distribution, but we’re working with the OCI to figure out how to get Helm’s published media types to be whitelisted with other providers including Docker Hub.cc @jdolitsky