Merge pull request #88 from tonistiigi/fix-private-pull-1809

[18.09 backport] builder: fix private pulls on buildkit
Upstream-commit: 3dc9802a83ba8ca42c2dc068e5c19dacd9bbe3db
Component: engine
This commit is contained in:
Tibor Vass
2018-10-18 10:57:46 -07:00
committed by GitHub

View File

@ -75,12 +75,12 @@ func (is *imageSource) ID() string {
func (is *imageSource) getResolver(ctx context.Context, rfn resolver.ResolveOptionsFunc, ref string) remotes.Resolver {
opt := docker.ResolverOptions{
Client: tracing.DefaultClient,
Credentials: is.getCredentialsFromSession(ctx),
Client: tracing.DefaultClient,
}
if rfn != nil {
opt = rfn(ref)
}
opt.Credentials = is.getCredentialsFromSession(ctx)
r := docker.NewResolver(opt)
return r
}