forked from openshift/assisted-test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.test-infra
26 lines (18 loc) · 1.41 KB
/
Dockerfile.test-infra
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
FROM quay.io/ocpmetal/bm-inventory:latest AS inventory
FROM centos:8
RUN yum -y install make python3 libvirt-client libvirt-devel gcc unzip wget curl git python3-devel && yum clean all;
RUN wget `wget https://www.terraform.io/downloads.html -q -O - | grep -oP "(https://releases.hashicorp.com/terraform/.*linux_amd64\.zip)(?=\")" | head -n 1` && unzip terraform*.zip -d /usr/bin/ && rm -rf terraform*.zip
RUN curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.10.1/minikube-linux-amd64 \
&& chmod +x minikube && mkdir -p /usr/local/bin/ && install minikube /usr/local/bin/
RUN curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl /usr/bin/
RUN mkdir -p /root/.terraform.d/plugins
RUN curl -SL https://github.com/dmacvicar/terraform-provider-libvirt/releases/download/v0.6.2/terraform-provider-libvirt-0.6.2+git.1585292411.8cbe9ad0.Fedora_28.x86_64.tar.gz | \
tar -xz -C /root/.terraform.d/plugins
COPY requirements.txt /tmp/
COPY --from=inventory /clients/bm-inventory-client-*.tar.gz /build/pip/
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt && \
find /build/pip/ -name 'setup.py' -exec dirname {} \; | xargs pip3 install
# TODO: Remove once OpenShift CI will be upgraded to 4.2 (see https://access.redhat.com/articles/4859371)
RUN chmod uga+w /etc/passwd
# setting pre-commit env
ENV PRE_COMMIT_HOME build