-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
66 lines (55 loc) · 1.87 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM debian:buster-backports
# Prepare system.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
curl \
ca-certificates \
p7zip-full \
ssh \
ruby \
&& rm -rf /var/lib/apt/lists/*
# Install Ansible, AWS CLI and boto.
RUN python3 -m pip install --no-cache-dir \
ansible \
boto \
awscli \
&& ansible --version \
&& aws --version
# Install Terraform.
ARG TERRAFORM_VERSION=0.12.23
RUN curl -fsSL "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" -o terraform.zip \
&& 7z x -o/usr/local/bin/ terraform.zip \
&& rm -rf terraform.zip \
&& terraform version
# Prepare terraform plugins.
ENV TF_PLUGIN_DIR=/usr/local/terraform-plugins/
# Install terraform-provider-aws.
ARG TERRAFORM_PROVIDER_AWS_VERSION=2.53.0
RUN curl -fsSL "https://releases.hashicorp.com/terraform-provider-aws/${TERRAFORM_PROVIDER_AWS_VERSION}/terraform-provider-aws_${TERRAFORM_PROVIDER_AWS_VERSION}_linux_amd64.zip" -o plugin.zip \
&& 7z x -o"$TF_PLUGIN_DIR" plugin.zip \
&& rm -rf plugin.zip
# Install jq.
RUN curl -fsSL https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -o /usr/local/bin/jq \
&& chmod +x /usr/local/bin/jq \
&& jq --version
# Install ruby gems.
RUN gem install --no-rdoc --no-ri \
table_print
# Expose Python 3 as `python`.
RUN ln -sT /usr/bin/python3 /usr/local/bin/python
# Print the state after the installation to simplify troubleshooting.
RUN set -x \
&& ls -la / \
&& ls -la /usr/local/bin \
&& ls -la "$TF_PLUGIN_DIR"
# Setup the workspace.
WORKDIR /vector-test-harness
COPY . .
# Set the entrypoint.
ENTRYPOINT [ "/vector-test-harness/docker/entrypoint" ]
# By default, print usage hint, and force users to specify command manually.
CMD [ "echo", "Usage: bin/test ..." ]