Easy creating next netperf branches
[functest-kubernetes.git] / docker / benchmarking / Dockerfile
1 FROM opnfv/functest-kubernetes-smoke
2
3 ARG NETPERF_TAG=master
4 ARG PLOTPERF_TAG=master
5
6 COPY plotperf.py.patch /tmp/plotperf.py.patch
7 RUN apk --no-cache add --update py3-matplotlib && \
8     apk --no-cache add --virtual .build-deps --update patch go && \
9     ln -s /usr/bin/python3 /usr/bin/python && \
10     git clone https://github.com/kubernetes/perf-tests && \
11     (cd perf-tests && git checkout $NETPERF_TAG) && \
12     (cd perf-tests/network/benchmarks/netperf && go build -o /usr/local/bin/launch launch.go) && \
13     curl https://raw.githubusercontent.com/girishkalele/pyplot-docker/$PLOTPERF_TAG/plotperf.py \
14         --output /usr/local/bin/plotperf.py && \
15     (cd /usr/local/bin && patch -p0 < /tmp/plotperf.py.patch && \
16         mv plotperf.py plotperf && chmod a+x plotperf) && \
17     rm -rf perf-tests /tmp/plotperf.py.patch && \
18     apk del .build-deps
19 COPY testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml
20 CMD ["run_tests", "-t", "all"]