From 391cc69c7bebe0217e49ffdfa7cadd4af95f2c92 Mon Sep 17 00:00:00 2001 From: Kausik Date: Tue, 3 Oct 2023 16:04:59 -0700 Subject: [PATCH] Use yum to install docker instead of amazon-linux-extra (#1425) * Use yum to install docker instead of amazon-extra * Fix libcrypt issue with docker-compose * CHnage installation of libxcrypt --- terraform/ec2/main.tf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/terraform/ec2/main.tf b/terraform/ec2/main.tf index 4d26d21f2..8f34f231d 100644 --- a/terraform/ec2/main.tf +++ b/terraform/ec2/main.tf @@ -405,9 +405,11 @@ resource "null_resource" "setup_sample_app_and_mock_server" { provisioner "remote-exec" { inline = [ "sudo yum update -y", - "sudo amazon-linux-extras install docker -y", + "sudo yum install -y libxcrypt-compat", + "sudo yum install -y docker", "sudo service docker start", "sudo usermod -a -G docker ec2-user", + "sudo ln -s /usr/lib/libcrypt.so /usr/lib/libcrypt.so.1", "sudo curl -L 'https://github.com/docker/compose/releases/download/1.27.4/docker-compose-Linux-x86_64' -o /usr/local/bin/docker-compose", "sudo chmod +x /usr/local/bin/docker-compose", "sudo `aws ecr get-login --no-include-email --region ${var.region}`",