-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.yaml
41 lines (35 loc) · 1.16 KB
/
Dockerfile.yaml
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
41
FROM ubuntu:latest
RUN mkdir /root/terraform
VOLUME /root/terraform/
RUN apt-get update && apt-get install -y \
nano \
curl \
git \
net-tools \
glibc-tools \
groff \
unzip \
python3 \
gnupg \
wget \
lsb-release
#&& rm -rf /var/lib/apt/lists/*
SHELL ["/bin/bash", "-c"]
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install
RUN wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \
tee /etc/apt/sources.list.d/hashicorp.list
RUN apt-get update && apt-get install -y \
software-properties-common \
terraform
ENV AWS_ACCESS_KEY=
ENV AWS_SECRET_KEY=
ENV AWS_REGION=eu-central-1
ENV AWS_OUTPUT=yaml
RUN aws configure set aws_access_key_id $AWS_ACCESS_KEY \
&& aws configure set aws_secret_access_key $AWS_SECRET_KEY \
&& aws configure set default.region $AWS_REGION \
&& aws configure set default.output $AWS_OUTPUT
WORKDIR /root/terraform/
ENTRYPOINT ["/bin/bash"]