@@ -13,7 +13,7 @@ import (
13
13
"strings"
14
14
"time"
15
15
16
- dockertypes "github.com/docker/docker/ api/types"
16
+ enginetypes "github.com/docker/engine- api/types"
17
17
docker "github.com/fsouza/go-dockerclient"
18
18
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
19
19
@@ -234,13 +234,22 @@ func buildDirectImage(dir string, ignoreFailures bool, opts *docker.BuildImageOp
234
234
Email : v .Email ,
235
235
}
236
236
}
237
+
237
238
keyring := credentialprovider.BasicDockerKeyring {}
238
239
keyring .Add (keys )
239
- e .AuthFn = func (name string ) ([]dockertypes .AuthConfig , bool ) {
240
+ e .AuthFn = func (name string ) ([]enginetypes .AuthConfig , bool ) {
240
241
authConfs , found := keyring .Lookup (name )
241
- var out []dockertypes .AuthConfig
242
+ var out []enginetypes .AuthConfig
242
243
for _ , conf := range authConfs {
243
- out = append (out , conf .AuthConfig )
244
+ c := enginetypes.AuthConfig {
245
+ Username : conf .Username ,
246
+ Password : conf .Password ,
247
+ Email : conf .Email ,
248
+ ServerAddress : conf .ServerAddress ,
249
+ IdentityToken : conf .IdentityToken ,
250
+ RegistryToken : conf .RegistryToken ,
251
+ }
252
+ out = append (out , c )
244
253
}
245
254
return out , found
246
255
}
0 commit comments