gateway: allow digest to be optional

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
docker-18.09
Tonis Tiigi 2018-06-20 11:09:32 -07:00
parent cfe4e19158
commit e5449521f5
1 changed files with 5 additions and 3 deletions

View File

@ -103,9 +103,11 @@ func (gf *gatewayFrontend) Solve(ctx context.Context, llbBridge frontend.Fronten
return nil, nil, err
}
sourceRef, err = reference.WithDigest(sourceRef, dgst)
if err != nil {
return nil, nil, err
if dgst != "" {
sourceRef, err = reference.WithDigest(sourceRef, dgst)
if err != nil {
return nil, nil, err
}
}
src := llb.Image(sourceRef.String())