-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.ubi8
49 lines (43 loc) · 2.16 KB
/
Dockerfile.ubi8
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
FROM registry.ci.openshift.org/openshift/release:golang-1.17 AS builder
WORKDIR /root
COPY . .
RUN make build
FROM registry.access.redhat.com/ubi8/ubi:8.5
COPY --from=builder /root/_output/ptrp /usr/local/bin/
WORKDIR /root
# Automatically quit if the time of a test run exceeds 3x the average time it normally takes the particular test to complete its run.
ENV TEST_TIMEOUT_AFTER=auto
ARG ARCH
ARG PTS_TEST_SUITE
ARG INSTALL_PKGS=" \
expect strace tmux rpm-build procps-ng rsync \
php-cli php-xml php-json unzip google-benchmark google-benchmark-devel \
cmake perl perl-CPAN cmake-filesystem pkg-config ncurses-devel libtool \
libassuan-devel xz time \
"
# phoronix-test-suite.xml with settings for running tests in a batch mode.
# Helper scripts and opinionated test-suites included.
COPY ./assets/linux/all/ /
COPY ./assets/linux/$ARCH/ /
# Initialize /etc/yum.repos.d/redhat.repo
# See https://access.redhat.com/solutions/1443553
RUN subscription-manager repos --enable rhel-8-for-$(arch)-appstream-rpms && \
subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms && \
dnf install -y --setopt=tsflags=nodocs https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
dnf repolist --disablerepo=* && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
curl -LO https://kojipkgs.fedoraproject.org/vol/fedora_koji_archive02/packages/npth/1.5/4.fc28/src/npth-1.5-4.fc28.src.rpm && \
rpmbuild --rebuild *.rpm && \
rpm -ivh /root/rpmbuild/RPMS/$(arch)/npth-devel-1.*.rpm && \
curl -LO https://phoronix-test-suite.com/releases/phoronix-test-suite-10.8.3.tar.gz && \
tar xvf *.gz && \
cd phoronix-test-suite/ && \
mv pts-core/objects/pts_openbenchmarking_upload.php{,.disabled} && \
sed -i 's|<PackageName>python python3|<PackageName>python3|' ./pts-core/external-test-dependencies/xml/fedora-packages.xml && \
for ts in $PTS_TEST_SUITE; do \
./phoronix-test-suite install-dependencies $ts && \
./phoronix-test-suite install $ts; \
done && \
dnf clean all && \
rm -rf /etc/pki/entitlement /etc/rhsm && \
rm -rf /root/{rpmbuild,*.rpm,*.tar.gz} /var/cache/yum