From 7daee9a0df1b3c4c67dffb21be7617cec8c47516 Mon Sep 17 00:00:00 2001 From: John McDowall Date: Sat, 20 May 2023 13:46:05 -0700 Subject: [PATCH] Update the README on the use of shelling out to the aws cli command to obtain the token for ECR automatically --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index f106f7ef..9203cac2 100644 --- a/README.md +++ b/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: .dkr.ecr..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`: