mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 05:28:07 +08:00
cb2af94b0b
* feat: add support for docker images Issue #724 A new config section under "HTTP" called "Compat" is added which currently takes a list of possible compatible legacy media-types. https://github.com/opencontainers/image-spec/blob/main/media-types.md#compatibility-matrix Only "docker2s2" (Docker Manifest V2 Schema V2) is currently supported. Garbage collection also needs to be made aware of non-OCI compatible layer types. feat: add cve support for non-OCI compatible layer types Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> * Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> * test: add more docker compat tests Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> * feat: add additional validation checks for non-OCI images Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> * ci: make "full" images docker-compatible Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> --------- Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
32 lines
874 B
Go
32 lines
874 B
Go
package local
|
|
|
|
import (
|
|
"zotregistry.dev/zot/pkg/compat"
|
|
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
|
zlog "zotregistry.dev/zot/pkg/log"
|
|
"zotregistry.dev/zot/pkg/storage/cache"
|
|
common "zotregistry.dev/zot/pkg/storage/common"
|
|
"zotregistry.dev/zot/pkg/storage/imagestore"
|
|
storageTypes "zotregistry.dev/zot/pkg/storage/types"
|
|
)
|
|
|
|
// NewImageStore returns a new image store backed by a file storage.
|
|
// Use the last argument to properly set a cache database, or it will default to boltDB local storage.
|
|
func NewImageStore(rootDir string, dedupe, commit bool, log zlog.Logger,
|
|
metrics monitoring.MetricServer, linter common.Lint, cacheDriver cache.Cache,
|
|
compat []compat.MediaCompatibility,
|
|
) storageTypes.ImageStore {
|
|
return imagestore.NewImageStore(
|
|
rootDir,
|
|
rootDir,
|
|
dedupe,
|
|
commit,
|
|
log,
|
|
metrics,
|
|
linter,
|
|
New(commit),
|
|
cacheDriver,
|
|
compat,
|
|
)
|
|
}
|