Currently, I have this command in my bash script for building & pushing an image to Amazon ECR
docker login -u AWS -p "$(aws ecr get-login-password)" "https://$(aws sts get-caller-identity --query 'Account' --output text).dkr.ecr.us-east-1.amazonaws.com"
Which gives the warning "WARNING! Using --password via the CLI is insecure. Use --password-stdin."
How can I change this command to not give the warning? Is this really insecure?