forked from openshift/assisted-test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.assisted-test-infra
61 lines (50 loc) · 2.18 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM quay.io/edge-infrastructure/assisted-service:latest AS service
FROM quay.io/centos/centos:stream9
# A directory in the path with write permission even for non-root users
ENV TOOLS=/tools/
ENV PATH="$TOOLS:$PATH"
RUN mkdir $TOOLS --mode g+xw
# CRB repo is required for libvirt-devel
RUN dnf -y install --enablerepo=crb \
make \
gcc \
unzip \
wget \
curl-minimal \
git \
httpd-tools \
jq \
nss_wrapper \
python3 \
python3-devel \
libvirt-client \
libvirt-devel \
libguestfs-tools \
libxslt \
&& 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/1.2.7/terraform_1.2.7_linux_amd64.zip && unzip terraform.zip -d /usr/bin/ && rm -rf terraform.zip
RUN curl --retry 5 -L https://github.com/containers/podman/releases/download/v3.4.4/podman-remote-static.tar.gz -o "/tmp/podman-remote3.tar.gz" && \
tar -zxvf /tmp/podman-remote3.tar.gz && \
mv podman-remote-static /tools/podman-remote3 && \
rm -f /tmp/podman-remote3.tar.gz &&\
curl --retry 5 -L https://github.com/containers/podman/releases/download/v4.1.1/podman-remote-static.tar.gz -o "/tmp/podman-remote4.tar.gz" && \
tar -zxvf /tmp/podman-remote4.tar.gz && \
mv podman-remote-static /tools/podman-remote4 && \
rm -f /tmp/podman-remote4.tar.gz
COPY --from=quay.io/ocp-splat/govc:v0.29.0 /govc /usr/local/bin
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