Skip to content

Commit

Permalink
Use multi-stage Dockerfile to build Fio
Browse files Browse the repository at this point in the history
  • Loading branch information
rsevilla87 authored and aakarshg committed Apr 13, 2020
1 parent f85acd8 commit 613e288
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions fio_wrapper/Dockerfile
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

0 comments on commit 613e288

Please sign in to comment.