Skip to content

Commit 5dafe5c

Browse files
csweichelroboquat
authored andcommitted
[image-builder-mk3] Fix docker.io interaction
1 parent 7f8bd4f commit 5dafe5c

File tree

1 file changed

+6
-0
lines changed
  • components/image-builder-bob/pkg/proxy

1 file changed

+6
-0
lines changed

components/image-builder-bob/pkg/proxy/proxy.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ func NewProxy(host *url.URL, aliases map[string]Repo) (*Proxy, error) {
2222
if host.Host == "" || host.Scheme == "" {
2323
return nil, fmt.Errorf("host Host or Scheme are missing")
2424
}
25+
for k, v := range aliases {
26+
// We need to translate the default hosts for the Docker registry.
27+
// If we don't do this, pulling from docker.io will fail.
28+
v.Host, _ = docker.DefaultHost(v.Host)
29+
aliases[k] = v
30+
}
2531
return &Proxy{
2632
Host: *host,
2733
Aliases: aliases,

0 commit comments

Comments
 (0)