Skip to content

Commit

Permalink
fix: handle no docker auth
Browse files Browse the repository at this point in the history
  • Loading branch information
skylenet committed Oct 30, 2024
1 parent 861ec61 commit 3c3100b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ func storeConfigInVolume(
if err != nil {
return stacktrace.NewError("An error occurred getting auth for registry '%v' from Docker config: %v", registry, err)
}
cfg.Auths[registry] = *creds
// creds can be nil if the registry doesn't have auth
if creds != nil {
cfg.Auths[registry] = *creds
}
}

cfgJsonStr, err := json.Marshal(cfg)
Expand Down

0 comments on commit 3c3100b

Please sign in to comment.