Skip to content

Commit 551b37b

Browse files
author
Michal Minář
committed
Exit normally if registry's storage is empty
In earlier versions of docker-registry, repository enumeration didn't return error for empty registry storage while the blob enumeration function did. This case needs to be handled. Signed-off-by: Michal Minář <[email protected]>
1 parent 5efa5b8 commit 551b37b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/dockerregistry/server/prune/prune.go

+4
Original file line numberDiff line numberDiff line change
@@ -192,5 +192,9 @@ func Prune(ctx context.Context, storageDriver driver.StorageDriver, registry dis
192192

193193
return nil
194194
})
195+
if e, ok := err.(driver.PathNotFoundError); ok {
196+
logger.Warnf("No repositories found: %v", e)
197+
return stats, nil
198+
}
195199
return stats, err
196200
}

0 commit comments

Comments
 (0)