Transfer: Registry: Enable to use registry configuration diretory
Currently transfer service isn't aware of configurations of hosts directory and ctr's `--hosts-dir` doesn't work. This commit fixes this issue by using `config.ConfigureHosts` instead of `docker.ConfigureDefaultRegistries`. This commit also fixes ctr to use this feature for "--hosts-dir" flag. Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
@@ -132,7 +132,10 @@ command. As part of this process, we do the following:
|
||||
sopts = append(sopts, image.WithAllMetadata)
|
||||
}
|
||||
|
||||
reg := registry.NewOCIRegistry(ref, nil, ch)
|
||||
reg, err := registry.NewOCIRegistry(ctx, ref, registry.WithCredentials(ch), registry.WithHostDir(context.String("hosts-dir")))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
is := image.NewStore(ref, sopts...)
|
||||
|
||||
pf, done := ProgressHandler(ctx, os.Stdout)
|
||||
|
||||
Reference in New Issue
Block a user