-
Notifications
You must be signed in to change notification settings - Fork 949
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
feature: add default registry namespace #911
Conversation
Codecov Report
@@ Coverage Diff @@
## master #911 +/- ##
==========================================
+ Coverage 13.66% 13.67% +<.01%
==========================================
Files 121 121
Lines 7667 7666 -1
==========================================
Hits 1048 1048
+ Misses 6529 6528 -1
Partials 90 90
Continue to review full report at Codecov.
|
LGTM |
@@ -19,7 +20,7 @@ func (mgr *ImageManager) addRegistry(input string) string { | |||
if _, ok := reference.Domain(input); ok { | |||
return input | |||
} | |||
return mgr.DefaultRegistry + input | |||
return filepath.Join(mgr.DefaultRegistry, mgr.DefaultNamespace, input) |
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.
That means we only specify the image name after merge this pr, just like pouch pull centos
?
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.
no, it just follow original logic, not change it, what I do is to split docker.io/library into docker.io + library.
@@ -81,7 +81,8 @@ func setupFlags(cmd *cobra.Command) { | |||
flagSet.BoolVar(&cfg.IsLxcfsEnabled, "enable-lxcfs", false, "Enable Lxcfs to make container to isolate /proc") | |||
flagSet.StringVar(&cfg.LxcfsBinPath, "lxcfs", "/usr/local/bin/lxcfs", "Specify the path of lxcfs binary") | |||
flagSet.StringVar(&cfg.LxcfsHome, "lxcfs-home", "/var/lib/lxc/lxcfs", "Specify the mount dir of lxcfs") | |||
flagSet.StringVar(&cfg.DefaultRegistry, "default-registry", "registry.hub.docker.com/library/", "Default Image Registry") | |||
flagSet.StringVar(&cfg.DefaultRegistry, "default-registry", "registry.hub.docker.com", "Default Image Registry") |
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.
I have not got your point yet, why we need split this params into two part? can you explain it, thanks a lot
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.
for fix #892, I will add this issue into my commit.
Fixes: #892. Signed-off-by: Ace-Tang <[email protected]>
Signed-off-by: Ace-Tang [email protected]
Ⅰ. Describe what this PR did
add registry namespace in config, it will be used in pull/push/search images.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews