add support for "registry-mirrors" and "insecure-registries" to buildkit#37852
add support for "registry-mirrors" and "insecure-registries" to buildkit#37852tonistiigi merged 2 commits intomoby:masterfrom
Conversation
e6b79b6 to
9eb0664
Compare
|
@tonistiigi ptal when you have a chance |
c16325e to
9047d3b
Compare
Codecov Report
@@ Coverage Diff @@
## master #37852 +/- ##
==========================================
- Coverage 36.12% 36.12% -0.01%
==========================================
Files 610 610
Lines 45083 45114 +31
==========================================
+ Hits 16288 16296 +8
- Misses 26555 26580 +25
+ Partials 2240 2238 -2 |
Signed-off-by: Anda Xu <anda.xu@docker.com>
9047d3b to
3c14b8b
Compare
ac4e143 to
59482e0
Compare
|
ping @tiborvass @tonistiigi |
There was a problem hiding this comment.
nit: unneeded whitespace
There was a problem hiding this comment.
this is going to panic if there is no //, which according to https://github.com/moby/moby/blob/master/registry/service_v2.go#L15 could happen.
There was a problem hiding this comment.
Cleaner to use strings.Index, maybe like
if idx := strings.Index(v, "://"); idx > 0 {
v = v[idx+3:]
}
There was a problem hiding this comment.
Does this need to get set if the mirror prefix is "http://"?
There was a problem hiding this comment.
@dmcgowan Ah I think I the "http://" prefix must be trimmed here as well. Otherwise, buildkit will add an extra prefix.
59482e0 to
0695415
Compare
0695415 to
0f24381
Compare
There was a problem hiding this comment.
Is http:// not valid in configuration?
There was a problem hiding this comment.
OK. Actually I just learned it is also valid 😅
There was a problem hiding this comment.
Added a trimming for that as well
Signed-off-by: Anda Xu <anda.xu@docker.com>
0f24381 to
171d51c
Compare
|
LGTM |
|
@tiborvass @dmcgowan updated the PR based on the comments. Ptal when you have time. |
- What I did
registry-mirrorandinsecure-registriesfields fromdaemon.jsonto buildkit in order to make use.daemon.jsonfile changes.- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)