-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use multi-stage Dockerfile to build Fio
- Loading branch information
1 parent
f85acd8
commit 613e288
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
FROM registry.access.redhat.com/ubi8:latest | ||
FROM registry.access.redhat.com/ubi8:latest as builder | ||
COPY image_resources/centos8.repo /etc/yum.repos.d/centos8.repo | ||
RUN dnf install -y --enablerepo=centos8 make gcc libaio zlib-devel libaio-devel | ||
RUN curl -L https://github.com/axboe/fio/archive/fio-3.12.tar.gz | tar xzf - | ||
RUN pushd fio-fio-3.12 && make -j2 | ||
|
||
RUN dnf copr enable ndokos/pbench -y | ||
COPY image_resources/centos8-appstream.repo /etc/yum.repos.d/centos8-appstream.repo | ||
RUN dnf install -y --nodocs pbench-fio --enablerepo=centos8-appstream | ||
RUN dnf install -y --nodocs git python3-pip python3-requests python3-numpy | ||
RUN dnf install -y --nodocs procps-ng iproute net-tools ethtool nmap iputils | ||
FROM registry.access.redhat.com/ubi8:latest | ||
COPY --from=builder /fio-fio-3.12/fio /usr/local/bin/fio | ||
RUN dnf install -y --nodocs git python3-pip python3-requests python3-numpy libaio zlib procps-ng iproute net-tools ethtool nmap iputils && dnf clean all | ||
RUN ln -s /usr/bin/python3 /usr/bin/python | ||
COPY . /opt/snafu/ | ||
RUN pip3 install --upgrade-strategy=only-if-needed -r /opt/snafu/requirements.txt |