-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
34 lines (26 loc) · 1.12 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
FROM ubuntu:focal
ARG TERRAFORM_VERSION="1.9.2"
ARG ANSIBLE_VERSION="2.10.7"
ARG PACKER_VERSION="1.5.4"
LABEL maintainer="xNok <nokwebspace@gmail.com>"
LABEL terraform_version=${TERRAFORM_VERSION}
LABEL ansible_version=${ANSIBLE_VERSION}
LABEL aws_cli_version=${AWSCLI_VERSION}
ENV DEBIAN_FRONTEND=noninteractive
ENV AWSCLI_VERSION=${AWSCLI_VERSION}
ENV TERRAFORM_VERSION=${TERRAFORM_VERSION}
ENV PACKER_VERSION=${PACKER_VERSION}
# Install apt packages and hashicorp products
RUN apt-get update \
&& apt-get install -y curl python3 python3-pip unzip \
&& apt-get install -y openssh-client openssh-server sshpass \
&& curl -LO https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& curl -LO https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip \
&& unzip '*.zip' -d /usr/local/bin \
&& rm *.zip
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY ./requirements.txt requirements.txt
# Install ansible with pip plus require packages
RUN pip3 install -r ./requirements.txt
CMD ["/bin/bash"]