Skip to content

Commit

Permalink
DT-4621 // Docker passthrough login output
Browse files Browse the repository at this point in the history
Coop with @dotboris
  • Loading branch information
pballandras authored Mar 17, 2022
1 parent ec2e8d1 commit 65d722c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,11 @@ func (docker *dockerConfig) tryLoginToECR(image string) error {
dockerLoginCmd := exec.Command(
"docker", "login", "-u",
strings.Split(decodedLogin, ":")[0],
"-p", strings.Split(decodedLogin, ":")[1],
"--password-stdin",
*result.AuthorizationData[0].ProxyEndpoint,
)
dockerLoginCmd.Stdin = strings.NewReader(strings.Split(decodedLogin, ":")[1])
dockerLoginCmd.Stdout, dockerLoginCmd.Stderr = os.Stdout, os.Stderr
if err := dockerLoginCmd.Run(); err != nil {
return errors.Managed(err.Error())
}
Expand Down

0 comments on commit 65d722c

Please sign in to comment.