From f6fd67b56e425908b7e4e5744f0a2799ffc42358 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Thu, 23 Nov 2023 04:40:01 -0800 Subject: [PATCH] fix: `spacelift/worker-pool` AMI User Data Docker Login (#913) --- modules/spacelift/worker-pool/templates/user-data.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/spacelift/worker-pool/templates/user-data.sh b/modules/spacelift/worker-pool/templates/user-data.sh index db8ae1cae..d145a8059 100644 --- a/modules/spacelift/worker-pool/templates/user-data.sh +++ b/modules/spacelift/worker-pool/templates/user-data.sh @@ -3,7 +3,9 @@ spacelift() { ( set -e - $(aws --region ${ecr_region} ecr get-login --registry-ids ${ecr_account_id} --no-include-email) + aws ecr get-login-password --region ${ecr_region} \ + | docker login --username AWS --password-stdin ${ecr_account_id}.dkr.ecr.${ecr_region}.amazonaws.com + docker pull ${spacelift_runner_image} echo "Updating packages (security)" | tee -a /var/log/spacelift/info.log