Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to pull images built for single platform with docker build and push action #715

Closed
abienkowski opened this issue Apr 3, 2023 · 4 comments · Fixed by #717
Closed

Comments

@abienkowski
Copy link

abienkowski commented Apr 3, 2023

Requires additional mediatype in Accept headers.

MediaType: application/vnd.oci.image.index.v1+json

time="2023-04-03T00:53:00Z" level=error msg="trigger.poll.RepositoryWatcher.addJob: failed to get image digest" error="Get \"https://index.docker.io/v2/***/***/manifests/latest\": http: non-successful response (status=404 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"MANIFEST_UNKNOWN\\\",\\\"message\\\":\\\"OCI index found, but accept header does not support OCI indexes\\\"}]}\\n\")" image="***/***:latest" password="************************************" username=*** time="2023-04-03T00:53:00Z" level=error msg="trigger.poll.RepositoryWatcher.Watch: failed to add image watch job" error="Get \"https://index.docker.io/v2/***/***/manifests/latest\": http: non-successful response (status=404 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"MANIFEST_UNKNOWN\\\",\\\"message\\\":\\\"OCI index found, but accept header does not support OCI indexes\\\"}]}\\n\")" image="namespace:latest,image:index.docker.io/***/***:latest,provider:kubernetes,trigger:poll,sched:@every 1m,secrets:[regcred]" time="2023-04-03T00:53:00Z" level=error msg="trigger.poll.manager: got error(-s) while watching images" error="encountered errors while adding images: Get \"https://index.docker.io/v2/***/***/manifests/latest\": http: non-successful response (status=404 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"MANIFEST_UNKNOWN\\\",\\\"message\\\":\\\"OCI index found, but accept header does not support OCI indexes\\\"}]}\\n\")"

@abienkowski abienkowski changed the title fails to pull images built for single platform with docker buildx fails to pull images built for single platform with docker build and push action Apr 3, 2023
@abienkowski
Copy link
Author

abienkowski commented Apr 3, 2023

When image is built the new and preferred way using docker buildx build command the MediaType is set to differently from when using docker build command. Additional Accept headers should be added to the client to support both types.

% docker buildx imagetools inspect ***/***1:latest
Name:      docker.io/***/***:latest
MediaType: application/vnd.oci.image.index.v1+json
....

% docker buildx imagetools inspect ***/***2:latest 
Name:      docker.io/***/***:latest
MediaType: application/vnd.docker.distribution.manifest.list.v2+json
...

@plpetkov-tech
Copy link

plpetkov-tech commented Apr 4, 2023

I got the same issue with every deployment I tried to put keel on :(

time="2023-04-04T14:31:01Z" level=error msg="trigger.poll.RepositoryWatcher.addJob: failed to get image digest" error="Get \"https://ghcr.io/v2/xxx/txxxc/manifests/latest\": http: non-successful response (status=404 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"MANIFEST_UNKNOWN\\\",\\\"message\\\":\\\"OCI index found, but Accept header does not support OCI indexes\\\"}]}\\n\")" image="xxxx/txxxxc:latest" password= username=

@OXIDFabian
Copy link

I got the same issue
time="2023-04-05T00:00:15Z" level=error msg="trigger.poll.RepositoryWatcher.addJob: failed to get image digest" error="Get \"https://ghcr.io/v2/****/****/manifests/latest\": http: non-successful response (status=404 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"MANIFEST_UNKNOWN\\\",\\\"message\\\":\\\"OCI index found, but Accept header does not support OCI indexes\\\"}]}\\n\")" image="****/****:latest" password= username=
time="2023-04-05T00:00:15Z" level=error msg="trigger.poll.RepositoryWatcher.Watch: failed to add image watch job" error="Get \"https://ghcr.io/v2/****/****/manifests/latest\": http: non-successful response (status=404 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"MANIFEST_UNKNOWN\\\",\\\"message\\\":\\\"OCI index found, but Accept header does not support OCI indexes\\\"}]}\\n\")" image="namespace:****,image:ghcr.io/****/****:latest,provider:helm3,trigger:poll,sched:@every 2m,secrets:[]"

@shanehughes1990
Copy link

shanehughes1990 commented Apr 5, 2023

I am getting the same it works with some docker hub images and not others, you can see pgadmin works fine, vaultwarden does not.

time="2023-04-05T01:44:52Z" level=info msg="trigger.poll.RepositoryWatcher: new watch tag digest job added" digest="sha256:ab5907625160a1b178de3e2f495c8ad0a17712f3bac2214614ec02b5db809fa4" image="dpage/pgadmin4:latest" job_name="index.docker.io/dpage/pgadmin4:latest" schedule="@every 10m"
time="2023-04-05T01:44:53Z" level=error msg="trigger.poll.RepositoryWatcher.addJob: failed to get image digest" error="Get \"https://index.docker.io/v2/vaultwarden/server/manifests/latest\": http: non-successful response (status=404 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"MANIFEST_UNKNOWN\\\",\\\"message\\\":\\\"OCI index found, but accept header does not support OCI indexes\\\"}]}\\n\")" image="vaultwarden/server:latest" password= username=
time="2023-04-05T01:44:53Z" level=error msg="trigger.poll.RepositoryWatcher.Watch: failed to add image watch job" error="Get \"https://index.docker.io/v2/vaultwarden/server/manifests/latest\": http: non-successful response (status=404 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"MANIFEST_UNKNOWN\\\",\\\"message\\\":\\\"OCI index found, but accept header does not support OCI indexes\\\"}]}\\n\")" image="namespace:frontend,image:index.docker.io/vaultwarden/server:latest,provider:kubernetes,trigger:poll,sched:@every 10m,secrets:[]"

Just as an FWI diun works fine with both of those images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants