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

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