-
Notifications
You must be signed in to change notification settings - Fork 581
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
BuildX: Missing package description / untagged Images at build with Platform: xy parameter #447
Comments
Afaik there should be an untagged version left behind assuming the new build is different. Tag-less stick around until you delete them on GHCR.
Not sure how it works on GHCR. I suggest to open a thread on https://github.uint.cloudmunity about that. WDYT @dhadka? The description is not displayed because it's a |
It seems I'm experiencing the same behavior.
The untagged images are new ones pushed at the same time as the last tagged image, they are not old images whose tag was taken by the new one. |
I see the same behavior in runatlantis/atlantis images The
The The workflow that builds the images are using multi arch images. When navigating to ghcr's container images, the https://github.com/runatlantis/atlantis/pkgs/container/atlantis/72928905?tag=dev With the following message
Is there a way to set this Ref
I also looked for some other examples of ghcr. The puppeteer project does not use multi arch and I do see its description showing up. https://github.com/puppeteer/puppeteer/pkgs/container/puppeteer/71913069?tag=19.7.2
The home-builder project uses multi arch and https://github.com/home-assistant/core/blob/ba929dfc79b32f4bd7aad1711224eb4385ad7745/.github/workflows/builder.yml#L369-L371 Only issue I could find on the github.community https://github.com/orgs/community/discussions/25664 It would be nice if the build-push-action allowed adding arbitrary fields to the manifest -
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: user/app:latest
manifest:
annotations:
"org.opencontainers.image.description": "DESCRIPTION" |
@nitrocode Yes with the |
Ah, I should have looked all the way at the bottom which shows - name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: ./Dockerfile
platforms: ${{ matrix.platforms }}
push: true
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=My multi-arch image Split up
I wonder why this has If we wanted to add multiple
or
I imagine the former since the latter is a complete guess. I'll have to experiment a little. Thanks again @crazy-max for looking into this with me. |
No
I don't think this is what you want. In your case you want X annotations when exporting your image. Not multiple exporters (this is also not yet supported moby/buildkit#2760). In your case it would look like this:
I do agree that UX is not great. Maybe an |
Behaviour
If I push my docker image with an action workflow to github packages, then I can find my docker image in the package chapter
of my desired repository.
Aside from that my currently pushed docker image is tagged with the right tag (latest and Release version):
![image](https://user-images.githubusercontent.com/45471644/131102622-08c5cb27-6f24-40e5-8cbd-8f20c1b3a36b.png)
Additional I can find the right description of the docker image:
![image](https://user-images.githubusercontent.com/45471644/131102696-46df7c29-f706-4c82-ba4f-bb032dd43df7.png)
Problem:
I need my docker Image for multiple architecture available.
Because of that I insert the line: platforms: linux/amd64,linux/arm64,linux/arm/v7 in my workflow file.
The push to the github package registry works fine with this, but I have this two problems:
Missing docker description after push with this parameter
![image](https://user-images.githubusercontent.com/45471644/131102221-b548fbc3-96c2-462f-bb4c-7d3d2ff3a40b.png)
At each push there I can find my new docker Image with the right tag (latest and Release version), but there are additional three untagged Images pushed
![image](https://user-images.githubusercontent.com/45471644/131102343-6f8f10ae-4d14-4f9f-8c18-bd9d1bf4c6e8.png)
Expected behaviour
If I use the platform parameter there should still be a description for my docker image.
There should not be untagged docker images after push with the platform parameter.
Thank you for your response!
My workflow.yml
The text was updated successfully, but these errors were encountered: