Fix auth again

This commit is contained in:
Bryce Lampe
2024-04-16 16:03:05 -07:00
parent 7c9632e428
commit f5d8e81f24
12 changed files with 97 additions and 27 deletions

View File

@@ -287,7 +287,8 @@ func (ia *ImageArgs) Annotate(a infer.Annotator) {
"docker-buildx" binary.
`))
a.SetDefault(&ia.Network, Default)
d := Default
a.SetDefault(&ia.Network, &d)
}
// ImageState is serialized to the program's state file.
@@ -350,7 +351,7 @@ func (i *Image) client(pctx provider.Context, state ImageState, args ImageArgs)
// We prefer auth from args, the provider, and state in that order. We
// build a slice in reverse order because wrap() will overwrite earlier
// entries with later ones.
auths := state.Registries
auths := []Registry{}
auths = append(auths, cfg.Registries...)
auths = append(auths, args.Registries...)