-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (31 loc) · 1.18 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
30
31
32
33
34
35
36
37
38
39
40
# Create docker container with Terraform installed, and suite of tools to ease working with AWS
FROM python:3.10-bullseye
ENV TERRAFORM_VERSION 1.1.7
ENV TERRAFORM_URL https://releases.hashicorp.com/terraform/$TERRAFORM_VERSION/terraform_${TERRAFORM_VERSION}_linux_amd64.zip
ENV PACKER_VERSION 1.7.10
ENV PACKER_URL https://releases.hashicorp.com/packer/$PACKER_VERSION/packer_${PACKER_VERSION}_linux_amd64.zip
ENV AWSCLI_URL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
RUN apt-get update && apt-get install -y \
dos2unix \
figlet \
nodejs \
npm \
vim
# Install Python Tools
# Boto3 is required for ansible to talk to AWS
RUN python -m pip install --upgrade pip
RUN pip install ansible aws-cdk-lib boto3 constructs==10.0.107
# Install AWSCLI
RUN curl -o /opt/awscliv2.zip $AWSCLI_URL && \
unzip /opt/awscliv2.zip && \
./aws/install && \
rm /opt/awscliv2.zip && \
rm -Rf /opt/aws
# Install Terraform
RUN curl -o /tmp/terraform.zip $TERRAFORM_URL && \
unzip /tmp/terraform.zip -d /usr/local/bin/
# Install Packer
RUN curl -o /tmp/packer.zip $PACKER_URL && \
unzip /tmp/packer.zip -d /usr/local/bin/
# Install AWS-CDK
RUN npm install -g aws-cdk