"Bad range" error when pushing images to the container registry #14604

Closed
opened 2025-11-02 11:17:18 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @jacopo-j on GitHub (Jun 14, 2025).

Description

I set up a simple Gitea Actions workflow for building a Docker image and publishing it on the container registry of the same Gitea instance. You can find the workflow file here.

During the publishing phase, the workflow fails with the following error:

::error::buildx failed with: ERROR: bad range format: 0--1

You can find the whole workflow log here, the error is at line 530-535.

I could not find any specific information regarding that error message, neither here nor elsewhere online. However, it likely comes from a response from the Gitea container registry.

By changing the workflow to publish the image con docker.io rather than my Gitea instance, everything works without errors, suggesting that the issue is not with a malformed Docker image (which I tried to re-build multiple times, by the way), but with the container registry itself.

Gitea Version

1.24.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.30.1

Operating System

macOS 11.6.3

How are you running Gitea?

Native using pre-build binaries for macOS

Database

MySQL/MariaDB

Originally created by @jacopo-j on GitHub (Jun 14, 2025). ### Description I set up a simple Gitea Actions workflow for building a Docker image and publishing it on the container registry of the same Gitea instance. You can find the workflow file [here](https://gist.github.com/jacopo-j/62bc84c07ec3f4d25cd62348de141aa5). During the publishing phase, the workflow fails with the following error: ``` ::error::buildx failed with: ERROR: bad range format: 0--1 ``` You can find the whole workflow log [here](https://gist.github.com/jacopo-j/c936a5cfc5bfedf566664bc56aeed1aa), the error is at line 530-535. I could not find any specific information regarding that error message, neither here nor elsewhere online. However, it likely comes from a response from the Gitea container registry. By changing the workflow to publish the image con docker.io rather than my Gitea instance, everything works without errors, suggesting that the issue is not with a malformed Docker image (which I tried to re-build multiple times, by the way), but with the container registry itself. ### Gitea Version 1.24.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.30.1 ### Operating System macOS 11.6.3 ### How are you running Gitea? Native using pre-build binaries for macOS ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 11:17:18 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jun 15, 2025):

Are you able to build your own binary? If yes, could you try this fix? Fix container range bug #34725

@wxiaoguang commented on GitHub (Jun 15, 2025): Are you able to build your own binary? If yes, could you try this fix? Fix container range bug #34725
Author
Owner

@jacopo-j commented on GitHub (Jun 15, 2025):

I tested the PR, and there is now a different error:

#13 ERROR: EOF
------
 > pushing my-gitea-instance.com/jacopo/my-repository:master with docker:
------
ERROR: EOF
::error::buildx failed with: ERROR: EOF
@jacopo-j commented on GitHub (Jun 15, 2025): I tested the PR, and there is now a different error: ``` #13 ERROR: EOF ------ > pushing my-gitea-instance.com/jacopo/my-repository:master with docker: ------ ERROR: EOF ::error::buildx failed with: ERROR: EOF ```
Author
Owner

@wxiaoguang commented on GitHub (Jun 15, 2025):

It looks strange, #34725 only fixes the wrong Range headers which didn't follow the spec, no idea why "EOF" now, or whether the EOF is related.

Is it possible to provide some reproducible steps with public images & docker cli?

@wxiaoguang commented on GitHub (Jun 15, 2025): It looks strange, #34725 only fixes the wrong Range headers which didn't follow the spec, no idea why "EOF" now, or whether the EOF is related. Is it possible to provide some reproducible steps with public images & docker cli?
Author
Owner

@wxiaoguang commented on GitHub (Jun 15, 2025):

By the way, I force-pushed a few times in #34725 (because at the beginning I have some misunderstanding and some old commits were wrong). The latest commit is dd53278c19 , is the EOF error caused by the latest commit when applied to the main or 1.24 branch?

@wxiaoguang commented on GitHub (Jun 15, 2025): By the way, I force-pushed a few times in #34725 (because at the beginning I have some misunderstanding and some old commits were wrong). The latest commit is https://github.com/go-gitea/gitea/pull/34725/commits/dd53278c19d7f165cfc78ac87e17e52768bb994c , is the EOF error caused by the latest commit when applied to the main or 1.24 branch?
Author
Owner

@jacopo-j commented on GitHub (Jun 15, 2025):

Sorry, you are right. The "EOF" issue was unrelated. I can confirm that your PR solves the issue.

@jacopo-j commented on GitHub (Jun 15, 2025): Sorry, you are right. The "EOF" issue was unrelated. I can confirm that your PR solves the issue.
Author
Owner

@wxiaoguang commented on GitHub (Jun 20, 2025):

Some users also reported the EOF error: EOF error when pushing Docker images to Gitea 1.24.1 registry (works fine in 1.24.0) #34792

Do you have some ideas? Does it work on your side?

@wxiaoguang commented on GitHub (Jun 20, 2025): Some users also reported the EOF error: EOF error when pushing Docker images to Gitea 1.24.1 registry (works fine in 1.24.0) #34792 Do you have some ideas? Does it work on your side?
Author
Owner

@jacopo-j commented on GitHub (Jun 20, 2025):

I believe the issue had to do with the reverse proxies I had in front of my Gitea instance, including Cloudflare for public web access. I have since changed my setup to push Docker images internally without passing through the reverse proxies, which by the way I believe is a more correct approach regardless of the EOF issue.

Since removing reverse proxies in the middle solved the issue for me, I did not spend much time trying to pinpoint the issue.

@jacopo-j commented on GitHub (Jun 20, 2025): I believe the issue had to do with the reverse proxies I had in front of my Gitea instance, including Cloudflare for public web access. I have since changed my setup to push Docker images internally without passing through the reverse proxies, which by the way I believe is a more correct approach regardless of the EOF issue. Since removing reverse proxies in the middle solved the issue for me, I did not spend much time trying to pinpoint the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14604