You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The credential helper now supports a variety of different mechanisms for
providing AWS credentials, and some of them are more complex than
others. This commit reorganizes the description about how AWS
credentials are sourced, adds more detail to the manual page, and
includes information about the bugs that may exist for some Kubernetes
users.
Copy file name to clipboardexpand all lines: README.md
+38-21
Original file line number
Diff line number
Diff line change
@@ -13,27 +13,8 @@ for the Docker daemon that makes it easier to use
13
13
14
14
You must have at least Docker 1.11 installed on your system.
15
15
16
-
You also must have AWS credentials available in one of the standard locations:
17
-
18
-
* The `~/.aws/credentials` file
19
-
* The `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
20
-
* An [IAM role for Amazon EC2](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html)
21
-
* If you are working with an assumed role please set the environment variable: `AWS_SDK_LOAD_CONFIG=true` also.
22
-
23
-
The Amazon ECR Docker Credential Helper uses the same credentials as the AWS
24
-
CLI and the AWS SDKs. For more information about configuring AWS credentials,
25
-
see
26
-
[Configuration and Credential Files](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files)
27
-
in the *AWS Command Line Interface User Guide*.
28
-
29
-
The credentials must have a policy applied that
30
-
[allows access to Amazon ECR](http://docs.aws.amazon.com/AmazonECR/latest/userguide/ecr_managed_policies.html).
31
-
32
-
If you are using a yet unreleased version of the plugin with web identity credentials support using
33
-
AssumeRoleWithWebIdentity in your k8s containers, you would need to set `AWS_SDK_LOAD_CONFIG=true` before
34
-
your invocation to `docker push`. Also, due to a current bug in k8s as discussed
35
-
[here](https://github.com/kubernetes-sigs/external-dns/pull/1185), for containers that don't run as root, you
36
-
would need the workaround mentioned there with `securityContext` of `nobody / 65534` on your k8s pod, otherwise, the token file is unreadable, and the plugin silently errors with a 401.
16
+
You also must have AWS credentials available. See the [AWS credentials section](#aws-credentials) for details on how to
17
+
use different AWS credentials.
37
18
38
19
## Installing
39
20
@@ -150,6 +131,8 @@ Docker to work with the helper.
150
131
151
132
## Configuration
152
133
134
+
### Docker
135
+
153
136
Place the `docker-credential-ecr-login` binary on your `PATH` and set the
154
137
contents of your `~/.docker/config.json` file to be:
155
138
@@ -178,6 +161,40 @@ ECR registry:
178
161
This is useful if you use `docker` to operate on registries that use different
179
162
authentication credentials.
180
163
164
+
### AWS credentials
165
+
166
+
The Amazon ECR Docker Credential Helper allows you to use AWS credentials stored different locations. Standard ones
167
+
include:
168
+
169
+
* The shared credentials file (`~/.aws/credentials`)
170
+
* The `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
171
+
* An [IAM role for an Amazon ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html)
172
+
* An [IAM role for Amazon EC2](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html)
173
+
174
+
To use credentials associated with a different named profile in the shared credentials file (`~/.aws/credentials`), you
175
+
may set the `AWS_PROFILE` environment variable.
176
+
177
+
The Amazon ECR Docker Credential Helper can optionally read and support some configuration options specified in the AWS
178
+
shared configuration file (`~/.aws/config`). To use these options, you must set the `AWS_SDK_LOAD_CONFIG` environment
179
+
variable to `true`. The supported options include:
180
+
181
+
* Assumed roles specified with `role_arn` and `source_profile`
182
+
* External credential processes specified with `credential_process`
183
+
* Web Identities like [IAM Roles for Service Accounts in
0 commit comments