Aws-cli: "aws ecr get-login" spills out non-existing parameter for "docker login"

Created on 12 Jun 2018  ·  3Comments  ·  Source: aws/aws-cli

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
guidance

Most helpful comment

You can pass in --no-include-email to the get-login command and it will remove the -e flag from the output

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vadimkim picture vadimkim  ·  3Comments

schams-net picture schams-net  ·  3Comments

rahul003 picture rahul003  ·  3Comments

ikim23 picture ikim23  ·  3Comments

KimberleySDU picture KimberleySDU  ·  3Comments