From 65d722c6bcc2aa700cd396dacc922a0e56c45b5a Mon Sep 17 00:00:00 2001 From: Philippe Ballandras Date: Thu, 17 Mar 2022 15:30:13 -0400 Subject: [PATCH] DT-4621 // Docker passthrough login output Coop with @dotboris --- docker.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker.go b/docker.go index 2870428c..381387b7 100644 --- a/docker.go +++ b/docker.go @@ -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()) }