Update the README on the use of shelling out to the aws cli command to obtain the token for ECR automatically
This commit is contained in:
13
README.md
13
README.md
@@ -184,6 +184,19 @@ registry:
|
||||
|
||||
A reference to secret `DOCKER_REGISTRY_TOKEN` will look for `ENV["DOCKER_REGISTRY_TOKEN"]` on the machine running MRSK.
|
||||
|
||||
#### Using AWS ECR as the container registry
|
||||
|
||||
AWS ECR's access token is only valid for 12hrs. In order to not have to manually regenerate the token every time, you can use ERB in the `deploy.yml` file to shell out to the `aws` cli command, and obtain the token:
|
||||
|
||||
```yaml
|
||||
registry:
|
||||
server: <your aws account id>.dkr.ecr.<your aws region id>.amazonaws.com
|
||||
username: AWS
|
||||
password: <%= %x(aws ecr get-login-password) %>
|
||||
```
|
||||
|
||||
You will need to have the `aws` CLI installed locally for this to work.
|
||||
|
||||
### Using a different SSH user than root
|
||||
|
||||
The default SSH user is root, but you can change it using `ssh/user`:
|
||||
|
||||
Reference in New Issue
Block a user