Open Wito-1 opened 9 months ago
I'm also experiencing this issue. I'm unable to get the work-around working though. Are you sure it's not just pulling from dockerhub in that case, since the image in the working example is "debian" and not "public.ecr.aws/debian/debian"?
Seems like something is broken about the metadata, where we can't distinguish image from imageIndex. Maybe this thing isn't following the specification.
I'm having a similar problem. Before rules_oci, my image indexes had this sort of json manifest:
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 4492,
"digest": "sha256:a97bcd99f2c5d7033d3b80c203b90557d4dacdea2d1c93b9465ccfe64c74f33f",
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 4492,
"digest": "sha256:32250033d499ec2afc1a44096fc72bf8cc569a7797b4dd6cb515ae06563e3127",
"platform": {
"architecture": "arm64",
"os": "linux"
}
}
]
}
under rules_oci they look more like this:
{
"schemaVersion": 2,
"manifests": [
{
"mediaType": "application/vnd.oci.image.index.v1+json",
"size": 648,
"digest": "sha256:77b10ee3e650f78f19bf8b18e23a77832db804a1897b0bbca1badca403786b7d"
}
]
}
I'm getting an error that looks like this in my app logic:
[dd:e17142] Error occurred while tagging demohelloworldpython image xxxx with tag 2.0.0 in registry 23432432423: Invalid parameter at 'ImageManifest' failed to satisfy constraint: 'Invalid JSON syntax' (Service: Ecr, Status Code: 400, Request ID: 0869a62c-8dcf-4207-93e9-f7638daf8c50)
It looks like when trying to download a debian image from AWS ECR: public.ecr.aws/debian/debian:latest, however, it looks like the manifest does not contain a
mediaType
field at the toplevel:Here's my MODULE.bazel file for reference:
Running on:
bazel 6.4.0
It seems to be able to pull fine if I provide the
digest
: