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
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.
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.
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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:
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
@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.
@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.