wrk.dockerfile 882 B

1234567891011121314151617181920212223242526272829
  1. FROM buildpack-deps:bionic
  2. RUN apt-get update && apt-get install -yqq libluajit-5.1-dev libssl-dev luajit
  3. WORKDIR /wrk
  4. RUN curl -sL https://github.com/wg/wrk/archive/4.1.0.tar.gz | tar xz --strip-components=1
  5. ENV LDFLAGS="-O3 -march=native -mtune=native -flto"
  6. ENV CFLAGS="-I /usr/include/luajit-2.1 $LDFLAGS"
  7. RUN make WITH_LUAJIT=/usr WITH_OPENSSL=/usr -j "$(nproc)"
  8. RUN cp wrk /usr/local/bin
  9. WORKDIR /
  10. # Required scripts for benchmarking
  11. COPY pipeline.lua pipeline.lua
  12. COPY concurrency.sh concurrency.sh
  13. COPY pipeline.sh pipeline.sh
  14. COPY query.sh query.sh
  15. RUN chmod 777 pipeline.lua concurrency.sh pipeline.sh query.sh
  16. # Environment vars required by the wrk scripts with nonsense defaults
  17. ENV name name
  18. ENV server_host server_host
  19. ENV levels levels
  20. ENV duration duration
  21. ENV max_concurrency max_concurrency
  22. ENV max_threads max_threads
  23. ENV pipeline pipeline
  24. ENV accept accept