Last active
March 8, 2021 11:17
-
-
Save tomharvey/d98a5ddc2ef498d6a71972d9ca55c7e5 to your computer and use it in GitHub Desktop.
A dockerfile to install wrk2 https://github.com/giltene/wrk2
This file contains hidden or 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
FROM ubuntu:focal | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential libreadline-dev curl unzip git libssl-dev libz-dev | |
RUN curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz && \ | |
tar -zxf lua-5.3.5.tar.gz && \ | |
cd lua-5.3.5 && \ | |
make linux test && \ | |
make install | |
RUN curl -R -O https://luarocks.github.io/luarocks/releases/luarocks-3.5.0.tar.gz && \ | |
tar -xzvf luarocks-3.5.0.tar.gz && \ | |
cd luarocks-3.5.0 && \ | |
./configure && make bootstrap | |
RUN git clone https://github.com/giltene/wrk2.git && \ | |
cd wrk2/ && \ | |
make && pwd && \ | |
ln -s /wrk2/wrk /usr/local/bin/wrk | |
ENTRYPOINT [ "wrk" ] | |
CMD ["--version"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a Dockerfile with these contents and run
docker build -t wrk2:latest .
Once the image has been built you can run something like
to send 2 requests per second for 1 minute at your testing endpoint.