Merge pull request #38057 from tonistiigi/fix-private-pull

builder: fix private pulls on buildkit
This commit is contained in:
Sebastiaan van Stijn 2018-10-18 15:29:46 +02:00 committed by GitHub
commit 0583eec896
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}