Browse Source

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

builder: fix private pulls on buildkit
Sebastiaan van Stijn 6 years ago
parent
commit
0583eec896
1 changed files with 2 additions and 2 deletions
  1. 2 2
      builder/builder-next/adapters/containerimage/pull.go

+ 2 - 2
builder/builder-next/adapters/containerimage/pull.go

@@ -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
 }