client: fix panic on exporting cache

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
docker-19.03
Tonis Tiigi 2019-03-12 11:18:54 -07:00
parent bab8c7ad2d
commit f4820681ce
1 changed files with 3 additions and 3 deletions

View File

@ -350,13 +350,13 @@ func parseCacheOptions(opt SolveOpt) (*cacheOptions, error) {
cacheExports []*controlapi.CacheOptionsEntry
cacheImports []*controlapi.CacheOptionsEntry
// legacy API is used for registry caches, because the daemon might not support the new API
legacyExportRef string
legacyExportAttrs map[string]string
legacyImportRefs []string
legacyExportRef string
legacyImportRefs []string
)
contentStores := make(map[string]content.Store)
indicesToUpdate := make(map[string]string) // key: index.JSON file name, value: tag
frontendAttrs := make(map[string]string)
legacyExportAttrs := make(map[string]string)
for _, ex := range opt.CacheExports {
if ex.Type == "local" {
csDir := ex.Attrs["dest"]