Pushing Multi Architecture container images results in HTTP 500 #13448

Closed
opened 2025-11-02 10:42:42 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @Janbong on GitHub (Sep 3, 2024).

Description

I'm trying to push my own built Muti-Arch container image to Gitea.

To keep it simple, I used minimal example from #25526.

Full steps to reproduce the issue:

echo FROM quay.io/rockylinux/rockylinux:9 > Dockerfile
sudo docker buildx build --platform linux/arm64,linux/amd64 . -t demo.gitea.com/janbong/test --push

Results in

------
 > pushing demo.gitea.com/janbong/test with docker:
------
ERROR: failed commit on ref "manifest-sha256:3e7adbc54660863d7a35856cdb05c7ee4dbfac9f0745a01ff2fa272917811ac5": unexpected status from PUT request to https://demo.gitea.com/v2/janbong/test/manifests/latest: 500 Internal Server Error

I used the demo site as registry in my example, as it is reproducable there as well.

In my own server logs, I found the following:

2024/09/03 16:44:53 ...ontainer/manifest.go:364:createPackageAndVersion() [E] Error inserting package: package version already exists
2024/09/03 16:44:53 ...ontainer/manifest.go:364:createPackageAndVersion() [E] Error inserting package: package version already exists
2024/09/03 16:44:53 ...ntainer/container.go:90:apiError() [E] package version already exists
2024/09/03 16:44:53 ...eb/routing/logger.go:102:func1() [I] router: completed PUT /v2/bngrs.net/docs/manifests/master for 10.3.77.20:34562, 500 Internal Server Error in 19.3ms @ container/container.go:539(container.UploadManifest)
2024/09/03 16:44:53 ...ntainer/container.go:90:apiError() [E] package version already exists
2024/09/03 16:44:53 ...eb/routing/logger.go:102:func1() [I] router: completed PUT /v2/bngrs.net/docs/manifests/master for 10.3.77.20:34552, 500 Internal Server Error in 21.6ms @ container/container.go:539(container.UploadManifest)

Doing the same, but pushing to Dockerhub works fine. I see the registry feature of Gitea as a selfhosted alternative to Dockerhub, so I was expecting similar results when pushing to both Dockerhub and Gitea's registry.

Any help is appreciated.

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Kubernetes on Ubuntu

How are you running Gitea?

As explained above, I was able to replicate the issue on https://demo.gitea.com.

I myself am running Gitea on Kubernetes.

Database

PostgreSQL

Originally created by @Janbong on GitHub (Sep 3, 2024). ### Description I'm trying to push my own built Muti-Arch container image to Gitea. To keep it simple, I used minimal example from #25526. Full steps to reproduce the issue: ``` echo FROM quay.io/rockylinux/rockylinux:9 > Dockerfile sudo docker buildx build --platform linux/arm64,linux/amd64 . -t demo.gitea.com/janbong/test --push ``` Results in ``` ------ > pushing demo.gitea.com/janbong/test with docker: ------ ERROR: failed commit on ref "manifest-sha256:3e7adbc54660863d7a35856cdb05c7ee4dbfac9f0745a01ff2fa272917811ac5": unexpected status from PUT request to https://demo.gitea.com/v2/janbong/test/manifests/latest: 500 Internal Server Error ``` I used the demo site as registry in my example, as it is reproducable there as well. In my own server logs, I found the following: ``` 2024/09/03 16:44:53 ...ontainer/manifest.go:364:createPackageAndVersion() [E] Error inserting package: package version already exists 2024/09/03 16:44:53 ...ontainer/manifest.go:364:createPackageAndVersion() [E] Error inserting package: package version already exists 2024/09/03 16:44:53 ...ntainer/container.go:90:apiError() [E] package version already exists 2024/09/03 16:44:53 ...eb/routing/logger.go:102:func1() [I] router: completed PUT /v2/bngrs.net/docs/manifests/master for 10.3.77.20:34562, 500 Internal Server Error in 19.3ms @ container/container.go:539(container.UploadManifest) 2024/09/03 16:44:53 ...ntainer/container.go:90:apiError() [E] package version already exists 2024/09/03 16:44:53 ...eb/routing/logger.go:102:func1() [I] router: completed PUT /v2/bngrs.net/docs/manifests/master for 10.3.77.20:34552, 500 Internal Server Error in 21.6ms @ container/container.go:539(container.UploadManifest) ``` Doing the same, but pushing to Dockerhub works fine. I see the registry feature of Gitea as a selfhosted alternative to Dockerhub, so I was expecting similar results when pushing to both Dockerhub and Gitea's registry. Any help is appreciated. ### Gitea Version 1.22.1 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Kubernetes on Ubuntu ### How are you running Gitea? As explained above, I was able to replicate the issue on https://demo.gitea.com. I myself am running Gitea on Kubernetes. ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 10:42:42 -06:00
Author
Owner

@lunny commented on GitHub (Sep 3, 2024):

Duplicate of #29563

@lunny commented on GitHub (Sep 3, 2024): Duplicate of #29563
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13448