Merge pull request #9908 from ktock/transfer-host-dir
Transfer: Registry: Enable to use registry configuration diretory
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)
|
||||
|
||||
@@ -104,7 +104,10 @@ var pushCommand = &cli.Command{
|
||||
if local == "" {
|
||||
local = ref
|
||||
}
|
||||
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(local)
|
||||
|
||||
pf, done := ProgressHandler(ctx, os.Stdout)
|
||||
|
||||
Reference in New Issue
Block a user