Using aws ecr get-login spills out login credentials that work, but the command fails to because of non existing parameter. I would guess it was removed by docker at some point.
Trying to login using the command that the aws cli outputs results in:
unknown shorthand flag: 'e' in -e
See 'docker login --help'.
Here are the acceptable parameters by docker login
# docker login --help
Usage:  docker login [OPTIONS] [SERVER]
Log in to a Docker registry
Options:
  -p, --password string   Password
      --password-stdin    Take the password from stdin
  -u, --username string   Username
                        You can pass in --no-include-email to the get-login command and it will remove the -e flag from the output
@tyhunt99 thanks for that! it works, but feels like a workaround.
The -e parameter might have made sense back in the days, but is no longer relevant. IMO it needs to go.
It would be nice to remove it but we are keeping it for backwards compatibility reasons as users may still be using an old version of docker that use it. The solution that @tyhunt99 provided is going to be your best option moving forward.
Most helpful comment
You can pass in
--no-include-emailto the get-login command and it will remove the-eflag from the output