mirror of
https://github.com/project-zot/zot.git
synced 2024-12-30 22:34:13 -05:00
Fix scrub command crash
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
parent
c9a81baa10
commit
d259ba6e4f
1 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,7 @@ import (
|
||||||
"zotregistry.io/zot/errors"
|
"zotregistry.io/zot/errors"
|
||||||
"zotregistry.io/zot/pkg/api"
|
"zotregistry.io/zot/pkg/api"
|
||||||
"zotregistry.io/zot/pkg/api/config"
|
"zotregistry.io/zot/pkg/api/config"
|
||||||
|
"zotregistry.io/zot/pkg/extensions/monitoring"
|
||||||
"zotregistry.io/zot/pkg/storage"
|
"zotregistry.io/zot/pkg/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -121,6 +122,7 @@ func newScrubCmd(conf *config.Config) *cobra.Command {
|
||||||
} else {
|
} else {
|
||||||
// server is down
|
// server is down
|
||||||
ctlr := api.NewController(conf)
|
ctlr := api.NewController(conf)
|
||||||
|
ctlr.Metrics = monitoring.NewMetricsServer(false, ctlr.Log)
|
||||||
|
|
||||||
if err := ctlr.InitImageStore(); err != nil {
|
if err := ctlr.InitImageStore(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
Loading…
Reference in a new issue