dockerlogin不明速记标志:'e'

我只是更新了我的docker版本,发现了这个命令

aws ecr get-login 

不再工作了 有错误:

未知的速记标志:-e中的“e”。 似乎docker不再支持-e标志。

有没有办法来解决这个问题?

安装版本:

 aws-cli/1.11.111 Python/2.7.10 Darwin/16.6.0 botocore/1.5.74 Docker version 17.06.0-ce-rc5, build b7e4173 

添加到您的电话

 --no-include-email 

这是新的有效语法:

 aws ecr get-login ${normal_params_here} --no-include-email aws ecr get-login --region us-east-1 --no-include-email # for example 

这个新的选项在05/23/2017上发布的版本1.11.91的AWS CLI中可用…发布此升级:

 pip install --upgrade awscli 

在这里看到细节

https://github.com/docker/for-mac/issues/1762

https://github.com/aws/aws-cli/issues/1926

去引用 :

“您应该在2017年5月23日前收到一封来自Amazon的关于aws ecr get-login上新的--no-include-email标志的电子邮件通知,以便与[Docker] 17.06.0兼容”

如果由于某种原因,你不能升级awscli版本,你可以做一些string操作,使它与你的sed工作。

例如:

 $(aws ecr get-login --region eu-central-1 | sed -e 's/-e none//g') 

这将删除不支持的-e标志,你应该可以login。

然而,我有同样的问题,斯科特·斯滕斯兰德的答案并没有解决。

如果发生在其他人身上,从命令中删除“-e none”解决了这个问题。