forked from openshift/assisted-test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.assisted-test-infra
46 lines (37 loc) · 1.51 KB
/
Dockerfile.assisted-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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM quay.io/edge-infrastructure/assisted-service:latest AS service
FROM quay.io/centos/centos:stream8
RUN dnf -y install \
make \
gcc \
unzip \
wget \
curl \
git \
podman \
httpd-tools \
jq \
nss_wrapper \
python39 \
python39-devel \
libvirt-client \
libvirt-devel \
libguestfs-tools \
&& dnf clean all
RUN curl --retry 5 -Lo packer.zip https://releases.hashicorp.com/packer/1.8.0/packer_1.8.0_linux_386.zip && unzip packer.zip -d /usr/bin/ && mv /usr/bin/packer /usr/bin/packer.io && rm -rf packer.zip
RUN curl --retry 5 -Lo terraform.zip https://releases.hashicorp.com/terraform/0.14.11/terraform_0.14.11_linux_amd64.zip && unzip terraform.zip -d /usr/bin/ && rm -rf terraform.zip
RUN curl --retry 5 -Lo - "https://github.com/vmware/govmomi/releases/latest/download/govc_$(uname -s)_$(uname -m).tar.gz" | tar -C /usr/local/bin -xvzf - govc
WORKDIR /home/assisted-test-infra
COPY requirements.txt requirements-dev.txt ./
COPY --from=service /clients/assisted-service-client-*.tar.gz /build/pip/
RUN pip3 install --upgrade pip && \
pip3 install --no-cache-dir -I -r ./requirements.txt -r ./requirements-dev.txt && \
pip3 install --upgrade /build/pip/*
RUN curl --retry 5 -s https://storage.googleapis.com/golang/go1.17.4.linux-amd64.tar.gz | tar -C /usr/local -xz
ENV GOPATH=/go
ENV GOCACHE=/go/.cache
ENV PATH=$PATH:/usr/local/go/bin:/go/bin
COPY . .
RUN chgrp -R 0 /home/assisted-test-infra && \
chmod -R g=u /home/assisted-test-infra
# setting pre-commit env
ENV PRE_COMMIT_HOME build