aws ecr get-login free for all

I do tech stuff, and here’s a headache for you:
you have a node that’s running docker version 17.09-ce. You have a jenkins process that will .ssh to this node, then do some fun stuff like connect to aws to grab images.

First try after setting up credentials and all that: aws ecr get-login . Spits a bunch of stuff out, but when you try to run the resulting command, it bails on the -e email parameter, because that’s deprecated.
So you follow the advice and use the –no-include-email parameter.
And that should work.
But your jenkins job fails. And keeps failing. It hates that –no-include-email parameter.
Turns out you have to install awscli twice on the local node.
You have to pip install –upgrade awscli , then
sudo -H pip install –upgrade awscli

Why? Who knows? It just doesn’t work otherwise.