[GH-ISSUE #157] [Bug] Dockerfile build fails to push to GitLab registry #1989

Closed
opened 2026-04-11 09:51:05 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Cirx08 on GitHub (Oct 27, 2024).
Original GitHub issue: https://github.com/moghtech/komodo/issues/157

Issue
Unable to push dockerfile build to private GitLab registry.

Steps:

  • Create and store a dockerfile in a repo.
  • Set up a builder.
  • Set up a build using the stored dockerfile.
  • Select the private registry and account.
  • Run the build

Expected:
The build runs and pushes the file to the private registry.

Actual:
The build portion runs successfully but on the push stage the selected credentials account username is appended to the registry Url hence making it invalid. Instead of https://registry.mydomain.com/myproject/myimage:latest it is forced to be https://registry.mydomain.com/username/myproject/myimage:latest

Originally created by @Cirx08 on GitHub (Oct 27, 2024). Original GitHub issue: https://github.com/moghtech/komodo/issues/157 **Issue** Unable to push dockerfile build to private GitLab registry. **Steps:** - Create and store a dockerfile in a repo. - Set up a builder. - Set up a build using the stored dockerfile. - Select the private registry and account. - Run the build **Expected:** The build runs and pushes the file to the private registry. **Actual:** The build portion runs successfully but on the push stage the selected credentials account username is appended to the registry Url hence making it invalid. Instead of https://registry.mydomain.com/myproject/myimage:latest it is forced to be https://registry.mydomain.com/username/myproject/myimage:latest
GiteaMirror added the info label 2026-04-11 09:51:05 -05:00
Author
Owner

@mbecker20 commented on GitHub (Oct 27, 2024):

Gitlab registry isn't any different than others actually, I think I see this issue here. You have to configure image_registry.organization = "myproject", and the image name to just "myimage". This will push the build under the organization namespace (in this Gitlab case its actually project namespace, Dockerhub calls it organization) instead of the account namespace.

The issue is the UI doesn't let you configure organization unless it is pre declared in here: https://github.com/mbecker20/komodo/blob/main/config/core.config.toml#L431

I just pushed this commit https://github.com/mbecker20/komodo/commit/3820cd0ca249982ec98ae72492dcb201397c830c which allows the UI to configure the Organization using custom value.

Since there is no backend change, the fix is pushed again to 1.16.4, just update Komodo Core to latest and set the "Organization" on the build from the Config page, and try it again.

<!-- gh-comment-id:2440136069 --> @mbecker20 commented on GitHub (Oct 27, 2024): Gitlab registry isn't any different than others actually, I think I see this issue here. You have to configure `image_registry.organization = "myproject"`, and the image name to just "myimage". This will push the build under the organization namespace (in this Gitlab case its actually project namespace, Dockerhub calls it organization) instead of the account namespace. The issue is the UI doesn't let you configure organization unless it is pre declared in here: https://github.com/mbecker20/komodo/blob/main/config/core.config.toml#L431 I just pushed this commit https://github.com/mbecker20/komodo/commit/3820cd0ca249982ec98ae72492dcb201397c830c which allows the UI to configure the Organization using custom value. Since there is no backend change, the fix is pushed again to 1.16.4, just update Komodo Core to latest and set the "Organization" on the build from the Config page, and try it again.
Author
Owner

@Cirx08 commented on GitHub (Oct 28, 2024):

As always thanks for the quick fixes. I have tested this now and can confirm it is working as expected now. Can I suggest one more thing though. Can we get a toggle for the version tags? I could live with latest and the full version tags but it also seems to create a tag for every major, minor, bugfix version numbers as well as the commit hash which would be good to be optional.

A suggestion though. As for this bug it can be closed out.

<!-- gh-comment-id:2441126132 --> @Cirx08 commented on GitHub (Oct 28, 2024): As always thanks for the quick fixes. I have tested this now and can confirm it is working as expected now. Can I suggest one more thing though. Can we get a toggle for the version tags? I could live with latest and the full version tags but it also seems to create a tag for every major, minor, bugfix version numbers as well as the commit hash which would be good to be optional. A suggestion though. As for this bug it can be closed out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#1989