llbsolver: show status of resolving image config

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
docker-18.09
Tonis Tiigi 2018-07-27 15:59:11 -07:00
parent fe3388e70d
commit b52c0002db
1 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package llbsolver
import (
"context"
"fmt"
"io"
"strings"
"sync"
@ -128,12 +129,16 @@ func (s *llbBridge) Exec(ctx context.Context, meta executor.Meta, root cache.Imm
return err
}
func (s *llbBridge) ResolveImageConfig(ctx context.Context, ref string, opt gw.ResolveImageConfigOpt) (digest.Digest, []byte, error) {
func (s *llbBridge) ResolveImageConfig(ctx context.Context, ref string, opt gw.ResolveImageConfigOpt) (dgst digest.Digest, config []byte, err error) {
w, err := s.resolveWorker()
if err != nil {
return "", nil, err
}
return w.ResolveImageConfig(ctx, ref, opt)
err = inVertexContext(s.builder.Context(ctx), fmt.Sprintf("resolve image config for %s", ref), func(ctx context.Context) error {
dgst, config, err = w.ResolveImageConfig(ctx, ref, opt)
return err
})
return dgst, config, err
}
type lazyCacheManager struct {