Another day, another problem with docker. I have a Windows server 2019, docker version 18.09.03 and I want to get my images to ECR.
For certain reasons, I can't have the warning docker : WARNING! Your password will be stored unencrypted My deployment tool considers it as an error and thus, doesn't deploy. I have therefore been looking how to use --password-stdin in the "correct" manner. Which isn't going very well.
Here is the Powershell script I am using right now.
#First step to create the file
aws ecr get-login --no-include-email | Out-File -FilePath FILEPATH
#Second step to filter the file and just get the password.
-split @(Get-Content -Path FILEPATH) |Select-Object -Index 5 | Out-File -FilePath FILEPATH
#Get authorized but stdin warning??
cat FILEPATH | docker login -u AWS --password-stdin https://NUMBER.dkr.ecr.eu-west-1.amazonaws.com
I am passing the password into a file then stdin from it, it works but it returns the warning.
I have tried that comment too (https://github.com/aws/aws-cli/issues/2875#issuecomment-433565983) but it doesn't accept the flags neither. I do
aws ecr get-login --no-include-email --region eu-west-1 --password-stdin and Unknown options: --password-stdin
aws ecr get-login --region us-east-1 --print-password-only
--print-password-only is unknows as well)
I am FULLY starting to get annoyed and frustrated by now. Any help would be appreciated, thanks!