-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
37 lines (31 loc) · 951 Bytes
/
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
FROM python:3.11-alpine
ENV AWSCLI_VERSION=2.10.0
ENV TERRAFORM_VERSION=1.6.3
RUN apk update && apk add --no-cache \
curl \
make \
cmake \
build-base \
gcc \
libc-dev \
libffi-dev \
openssl-dev \
git \
bash \
openssh \
vim \
npm
# Upgrade pip in a separate layer
RUN pip install --upgrade pip
# Install AWS CLI
RUN curl https://codeload.github.com/aws/aws-cli/tar.gz/refs/tags/${AWSCLI_VERSION} --output aws-cli-${AWSCLI_VERSION}.tar.gz \
&& tar -xf aws-cli-${AWSCLI_VERSION}.tar.gz \
&& cd aws-cli-${AWSCLI_VERSION} \
&& python -m pip install -q -r requirements.txt \
&& python -m pip install -e .
# Install Terraform
RUN wget --quiet https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& mv terraform /usr/bin \
&& rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip
CMD [ "terraform" ]