-
-
Notifications
You must be signed in to change notification settings - Fork 55
feat: Add support for private registries #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What exact error are you getting now? Non-docker.io registries should work, e.g. this does for me:
|
Ok sorry my bad I haven't tested it to the end. I now have the cause of the failure, if you have a private registry with a port different of 443 the image is not considered valid. Steps to reproduce:
So more precisely, the change that I've made is to support the official docker image name format https://docs.docker.com/reference/cli/docker/image/tag/ which is the following:
It does not work because:
But it should be working because the image format is correct:
But as we are already using a registry (the unregistry), host and port info is already specified...
In order to do that I quit the host, port and namespace part of the image, push it and then tag it by re-adding the host,port and namespace part (while remove the image without the info). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right; thanks for the fix.
Left a few suggestions.
Please rebase on top of the latest master, it should add some CI checks for the code.
I've made the changes suggested, and squashed the 2 commits as well as the rebase. |
Ran a test, there is a minor thing that I'd like to get fixed (update the name of the temporary image so it doesn't potentially collide with existing images), but let me do this as a follow-up. |
I didn't investigate but image parsing logic doesn't work for me (bash, version 5.2.37(1)-release (aarch64-apple-darwin23.6.0))
|
My 2 cents regarding this change and @tonyo's follow-up: da2720e#diff-d5e4d037c1ed36953841f496931701101aaac3efc12860de17810a6e931fad81R417 Note that when Docker does not use the containerd image store, overtime it will be filled up with If we don't prefix with Ideally, we'd want to retag the image in the containerd image store as well but we can't guarantee that the remote user has permissions to talk to containerd directly. What else can we do?
To me, 2a looks like a reasonable compromise. What do you guys think? @JonathanMbt, @tonyo |
I do use the same bash version as you are using: Bash symbol Bash symbol I suggest to change the regex in |
Humm that's right would be better to have something deterministic. 2a seems the better option IMO. |
2a sounds good; @JonathanMbt do you want to give it a try? |
Yup, I will ;) |
Follow-up: realized that I've misread the thread, somehow totally missed the part that it's broken on macos, and released it 🙈 |
Allow to share an image from a private registry and not only docker.io
Would allow to share for instance an image tagged like this: