forked from gruntwork-io/terragrunt-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (25 loc) · 1.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM ubuntu:22.04
ARG TERRAFORM_VERSION=1.6.0
ARG TERRAGRUNT_VERSION=0.59.6
# Install necessary packages and tools
RUN apt-get update && \
apt-get install -y bash curl unzip git sudo jq && \
# Install AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip aws && \
# Install Terraform
curl -Lo terraform_${TERRAFORM_VERSION}_linux_amd64.zip https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
mv terraform /usr/local/bin/ && \
chmod +x /usr/local/bin/terraform && \
rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
# Install Terragrunt
curl -Lo /usr/local/bin/terragrunt https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_amd64 && \
chmod +x /usr/local/bin/terragrunt && \
# Clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY ["./src/main.sh", "/action/main.sh"]
ENTRYPOINT ["/action/main.sh"]