Docker: Improve support for private registries


Recommended Posts

I'm building myself a application which is being built into a docker container and hosted in a private gitlab.com repo / registry.

The only problem is updating the container and showing correct information whether it is up-to-date or not in the docker tab.

 

The problem is that the webgui basically only works with docker hub images, since the registry is hardcoded into the update process and the getRemoteVersionV2 function.

I modified the webgui and created a pull request to follow the correct auth flow for tokens, etc

https://github.com/limetech/webgui/pull/403

 

So long as you run "docker login registry.gitlab.com/[...]" on unraid and ensure that the "/root/docker/config.json" is available after reboots the pull request will allow you to pull docker images from registry.gitlab.com which require authentication etc.

This should also work with other docker registries, since the pull request rewrites getRemoteVersionV2 to follow the correct authentication flow.

 

The only problem is that I couldn't test the changes in an unRAID install, since I'm not sure how to setup a dev environment for that (see also https://github.com/limetech/webgui/issues/400).

 

I'm mostly looking for some kind of acknowledgment that the pull request has been seen by someone other than me^^

And some info how to further test it would be great as well. (is there a unraid test vm?)

Link to comment

At least the rewrite of the getRemoteVersionV2 function would allow public containers from other registries to work correctly (I think, maybe I'll have to change some small things).

 

The current getRemoteVersionV2 function will only work with docker containers from hub.docker.com (since the token and api urls are hardcoded). And it would be more inline with how docker itself works (basically defaulting to hub.docker.com for the token flow, but using the api of the other registries if given).

If i decide to release my app and don't push it to hub.docker.com (for some reason or another) nobody will be able to update it, even if it is publicly available via the gitlab docker registry.

Edited by rhurling
added information
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.