-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (39 loc) · 1.17 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
42
43
44
45
46
47
48
49
50
51
52
# --->
# ---> Going with Ubuntu's Long Term Support (lts)
# ---> version which is currently 18.04.
# --->
FROM ubuntu:18.04
# --->
# ---> Assume the root user and install git, terraform,
# ---> and pythonic tools both for retrieving the CoreOS
# ---> AMI ID and the CoreOS etcd discovery url.
# --->
USER root
RUN apt-get update && apt-get --assume-yes install -qq -o=Dpkg::Use-Pty=0 \
curl \
git \
jq \
python-pip \
build-essential \
libssl-dev \
libffi-dev \
python-dev \
tree \
unzip
# --->
# ---> The python script (ran by Terraform) for pulling
# ---> down an etcd cluster discovery url needs a REST API
# ---> package called requests.
# --->
RUN pip install requests
# --->
# ---> Install the Terraform binary.
# --->
RUN \
curl -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/0.11.9/terraform_0.11.9_linux_amd64.zip && \
unzip /tmp/terraform.zip -d /usr/local/bin && \
chmod a+x /usr/local/bin/terraform && \
rm /tmp/terraform.zip && \
terraform --version
USER ubuntu
WORKDIR /home/ubuntu