Open ArKam opened 1 month ago
Can you describe your commands to upload the images or workflow file?
Sure, I'm just using docker client to:
Docker build and push the image:
docker build --push --platform linux/arm64 -t <forge_url>/<organisation>/<image_name>:<image_tag> .
&
docker build --push --platform linux/amd64 -t <forge_url>/<organisation>/<image_name>:<image_tag> .
Although I didn't tried the all in one command such as:
docker build --push --platform linux/arm64,linux/amd64 -t <forge_url>/<organisation>/<image_name>:<image_tag> .
As I use architecture dedicated runners.
I guess you forgot to create a multi-arch manifest.
docker manifest create \
{gitea.domain}/{owner}/{image}:latest \
{gitea.domain}/{owner}/{image}:amd64 \
{gitea.domain}/{owner}/{image}:arm64
docker manifest push {gitea.domain}/{owner}/{image}:latest
Multi-architecture best practices: https://docs.docker.com/build/building/multi-platform/
I guess you forgot to create a multi-arch manifest.
docker manifest create \ {gitea.domain}/{owner}/{image}:latest \ {gitea.domain}/{owner}/{image}:amd64 \ {gitea.domain}/{owner}/{image}:arm64 docker manifest push {gitea.domain}/{owner}/{image}:latest
However, this method will add some tags,it doesn't really solve your problem.Therefore, I recommend that you use docker buildx to create multi-architecture images.
docker buildx create --use --name {image}
docker buildx build --platform linux/amd64,linux/arm64 -t {gitea.domain}/{owner}/{image}:latest . --push
Description
Hi team,
I was pushing a container to the container registry as a feature test, when I found out that the registry doesn't support storing a container image for different architecture using the same image name.
If you build an image for both, linux/arm64 and linux/x86_64 or windows/arm64 and windows/x86_64 and try to push each resulting image to the container registry, the latest build will override the previous package.
With docker hub or quay or ghcr, you can have the same URL: forge.domain.tld/owner/package:version that deliver container version depending on the client spec (arm/x86_64) in here, from my understanding and test so far, I'll have to create an image with a name that specify-arm64 or -x86_64.
Gitea Version
1.22.2
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
provided by gitea/gitea:1.22.2
Operating System
linux
How are you running Gitea?
Using kubernetes to deploy gitea/gitea:1.22.2 release.
Database
PostgreSQL