Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update method for getting ECR credentials #273

Open
wants to merge 1 commit into
base: dotnet
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion module-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,15 @@ New-ECRRepository -RepositoryName mythicalmysfits/service
The response to this command will contain additional metadata about the created repository.
In order to push container images into our new repository, we will need to obtain authentication credentials for our Docker client to the repository. Run the following command, which will return a login command to retrieve credentials for our Docker client and then automatically execute it (include the full command including the $ below). 'Login Succeeded' will be reported if the command is successful. Run the below command using either the AWS CLI or the PowerShell command:

`Bash`
`Bash: AWS CLI 1.1`
```
$(aws ecr get-login --no-include-email)
```
`Bash: AWS CLI 2.0`
```
aws ecr get-login-password --region $(aws configure get region) | docker login --username AWS --password-stdin $(aws sts get-caller-identity --qu
ery Account --output text).dkr.ecr.$(aws configure get region).amazonaws.com
```
`PowerShell`
```
Invoke-Expression $(Get-ECRLoginCommand | Select-Object -ExpandProperty Command)
Expand Down