aws ecr get-login
**Note:** This command is deprecated. Use ``get-login-password`` instead. **To log in to an Amazon ECR registry** This command retrieves an authentication token using the GetAuthorizationToken API, and then it prints a ``docker login`` command with the authorization token and, if you specified a registry ID, the URI for an Amazon ECR registry. You can execute the printed command to authenticate to the registry with Docker. After you have authenticated to an Amazon ECR registry with this command, you can use the Docker CLI to push and pull images to and from that registry as long as your IAM principal has access to do so until the token expires. The authorization token is valid for 12 hours. .. note:: This command displays ``docker login`` commands to stdout with authentication credentials. Your credentials could be visible by other users on your system in a process list display or a command history. If you are not on a secure system, you should consider this risk and login interactively. For more information, see ``get-authorization-token``
Options
Name | Description |
---|---|
--registry-ids <string...> | A list of AWS account IDs that correspond to the Amazon ECR registries that you want to log in to |
--include-email | Specify if the '-e' flag should be included in the 'docker login' command. The '-e' option has been deprecated and is removed in Docker version 17.06 and later. You must specify --no-include-email if you're using Docker version 17.06 or later. The default behavior is to include the '-e' flag in the 'docker login' output |
--no-include-email | Include email arg |