-
Docker supports multiarchitecture build nowadays, which means you can upload several docker architecture variants for the same tag to Docker hub. This can all be done using a well configured Docker's buildx. I have a working example on my GH repo which uploads the multiarch artifact to ghcr.io instead of Docker hub: These are the actual artifacts (ready for pull in both architectures): |
Beta Was this translation helpful? Give feedback.
Replies: 20 comments 16 replies
-
Hi, thanks for your idea! Unfortunately we cannot build multiarch images as we rely on the docker repository api which itself is not able to handle multiarch container images. See #42 (comment) |
Beta Was this translation helpful? Give feedback.
-
@szaimen So how do you explain this? (Or am I missing something?) |
Beta Was this translation helpful? Give feedback.
-
Yes, docker hub is able to display multiarch images. I don't know if they implemented a custom, not documented api or how they are doing it. Feel free to investigate how you can retreive the checksums for multiarch images. See #42 (comment) for some initial steps |
Beta Was this translation helpful? Give feedback.
-
If you find a way, we may consider building multiarch images. |
Beta Was this translation helpful? Give feedback.
-
@szaimen The pipelines in my GitHub are modified for ghcr but I can adapt these to Dockerhub (The original script was for Dockerhub but I prefer ghcr so I modified it), where are your pipelines running? If we were to modify my pipelines all you need to do is to replace the name of the image to dockerhub instead of ghcr and login to Dockerhub (The username and password should be stored as Docker secrets), then run docker push. |
Beta Was this translation helpful? Give feedback.
-
No, that is not what I am talking about. Did you read the comments that I've linked to? |
Beta Was this translation helpful? Give feedback.
-
The problem is that we are not able to retreive the checksums of multiarch images via the docker repo api |
Beta Was this translation helpful? Give feedback.
-
I know that it is possible to create multiarch container images without much trouble |
Beta Was this translation helpful? Give feedback.
-
I see but why do you care so much for the hashes? Docker is agile enough to pull the right image to the right hosting arch. |
Beta Was this translation helpful? Give feedback.
-
Because we need that in order to be able to judge if the containers are up-to-date or not ;) |
Beta Was this translation helpful? Give feedback.
-
See e.g. all-in-one/php/src/Docker/DockerActionManager.php Lines 73 to 85 in 4e85276 |
Beta Was this translation helpful? Give feedback.
-
I saw something about tag architecture in here, could that possibly help? |
Beta Was this translation helpful? Give feedback.
-
Thanks but that is kind of actually what we are doing already: see all-in-one/php/src/Docker/DockerHubManager.php Lines 37 to 45 in 4e85276 So as I said: until you show me a way to get all needed hashes of multiarch images, this will not be implemented :) |
Beta Was this translation helpful? Give feedback.
-
I see, it looks like although there's architecture field in his responsed I couldn't find that officially. I'll get back to you if I'll find something, thanks. |
Beta Was this translation helpful? Give feedback.
-
Thank you, too! :) |
Beta Was this translation helpful? Give feedback.
-
I think I found something, run the following command on your machine and look at the output: There must be a way, I'll try to see if I can get some documentation for it but I can definitely see multiarch hashes. On the docker docs there's a warning saying that this is experimental. |
Beta Was this translation helpful? Give feedback.
-
Hi, I just found out that it is possible to get all digest by querying this endpoint: https://registry.hub.docker.com/v2/repositories/user/repository/tags example
However creating multi-arch images will also mean that testing gets much slower since I would alway need to wait until the multi-arch image is built which takes up to 45min compared to around 5min since Github Actions does not allow for hardware-accellaration. So I'd rather wait for that to be available before taking another look at this. |
Beta Was this translation helpful? Give feedback.
-
TODO:
|
Beta Was this translation helpful? Give feedback.
-
So basically everything was merged and built correclty but the digest did not match: So not sure how to proceed from here. I reverted the multiarch building and now the update check works correctly again. So it might depend on how exactly the manifests get created but not sure how to retrieve the correct digest. This needs more testing. |
Beta Was this translation helpful? Give feedback.
-
This is now released with v4.3.1 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel |
Beta Was this translation helpful? Give feedback.
This is now released with v4.3.1 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel