shekyan / slowhttptest

Application Layer DoS attack simulator
Apache License 2.0
1.51k stars 303 forks source link

Adding Dockerfile for compiling + running slowhttptest in a container #46

Closed jbrownsc closed 7 years ago

shekyan commented 7 years ago

Thanks! Can you please document when and how docker environment is beneficial to use?

jbrownsc commented 7 years ago

Sorry for the delay. Would something like the following work for the Wiki?

Running slowhttptest in Docker

The included Dockerfile allows you to build slowhttptest in a containerized Docker environment to avoid polluting your system with development dependencies. You can also use the Docker container for deploying slowhttptest to Kubernetes (Job), Mesos/DCOS (Task), Docker Swarm, etc... if that suites your needs.

  1. Build the docker container: docker build -t slowhttptest:latest .
  2. Run the docker container: docker run slowhttptest:latest <slowhttptest args>

If you make changes to the source, just re-run the steps and the changes will generate a new container with the updated binary inside the container.

If you don't want to run "docker run" over and over... you can get an interactive shell: docker run -ti --entrypoint sh slowhttptest:latest then run slowhttptest (it's in the path)

shekyan commented 7 years ago

This looks great. Put it anywhere in Installation and Usage, I'll try to reorganize wiki this weekend anyway.