forked from poanetwork/deployment-terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (35 loc) · 1.3 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
41
FROM ubuntu:16.04
RUN apt-get update -qq && \
apt-get install -qqy \
apt-transport-https \
build-essential \
libssl-dev \
curl \
git \
unzip \
lsb-release \
software-properties-common \
coreutils \
python \
python-dev
ENV TERAFORM_VERSION="0.11.8"
ENV ANSIBLE_VERSION="2.6.3"
RUN \
curl -fSs https://releases.hashicorp.com/terraform/${TERAFORM_VERSION}/terraform_${TERAFORM_VERSION}_linux_amd64.zip \
-o terraform_${TERAFORM_VERSION}_linux_amd64.zip && \
unzip terraform_${TERAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin && \
rm terraform_${TERAFORM_VERSION}_linux_amd64.zip
RUN \
curl -fsSL https://releases.ansible.com/ansible/ansible-${ANSIBLE_VERSION}.tar.gz -o ansible.tar.gz && \
mkdir ansible; tar -xzf ansible.tar.gz -C ansible --strip-components 1 && \
curl https://bootstrap.pypa.io/get-pip.py | python && \
pip install -U pip setuptools packaging msrestazure && \
cd ansible && make && make install
RUN \
AZ_REPO=$(lsb_release -cs); \
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \
tee /etc/apt/sources.list.d/azure-cli.list && \
curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
apt-get update && apt-get install -qqy azure-cli
RUN \
pip install -U msrestazure ansible[azure]