Aws-cli: Invalid '-e' flag for docker login generated by ecr get-login

Created on 7 Aug 2017  路  4Comments  路  Source: aws/aws-cli

Problem:
The 'ecr get-login' command is generating an incompatible syntax for latest docker version.
Docker 17.06 doesn't support the deprecated '-e' flag anymore and give the following error:

unknown shorthand flag: 'e' in -e
See 'docker login --help'.

This is a blocker for all my scripts using aws ecr get-login.

Command:
aws ecr get-login

Result:
docker login -u AWS -p <token> -e none https://<accountid>.dkr.ecr.us-east-1.amazonaws.com

Versions:
aws-cli/1.11.129 Python/2.7.10 Darwin/16.7.0 botocore/1.5.92
Docker version 17.06.0-ce, build 02c1d87

'--email' flag removal PR: https://github.com/docker/cli/pull/143

duplicate

Most helpful comment

You can remove that by specifying the --no-include-email flag. We default to including the email so we don't break customers still relying on it.

Duplicate of #2743, #2732, #2694, #2691, #2676, and a few others

All 4 comments

You can remove that by specifying the --no-include-email flag. We default to including the email so we don't break customers still relying on it.

Duplicate of #2743, #2732, #2694, #2691, #2676, and a few others

@joguSD Looks incorrect, I'm getting

unknown flag: --no-include-email

Removing the -e none part of the aws login command entirely let me log in though

+1 getting the same as @AndrewRayCode

(@AndrewRayCode @schematical)

@joguSD means using aws ecr get-login --no-include-email. It worked perfectly for me!

aws-cli/1.16.102
Docker version 18.06.1-ce

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kangman picture kangman  路  3Comments

pawelkilian picture pawelkilian  路  3Comments

ypant picture ypant  路  3Comments

vadimkim picture vadimkim  路  3Comments

motilevy picture motilevy  路  3Comments