Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.35 KB

README.md

File metadata and controls

36 lines (28 loc) · 1.35 KB

ApacheBench - Docker

MIT licensed

Docker container for ApacheBench (ab).

Prerequisites:

Usage:

  • Build container
docker build -t taherbs/ab:latest .
  • Ab help doc
docker run --rm --tty taherbs/ab --help
  • Run ab on a public website
# docker run --rm --tty CONTAINER_NAME -kl -t TIME_OUT -n NUMBER_OF_REQUESTS -c NUMBER_OF_CONCURRENCY WEB_SERVER_URL
docker run --rm --tty taherbs/ab -kl -t 60 -n 10 -c 10 http://www.yahoo.com/
  • Run on a working local docker web container
# docker run --network WEB_CONTAINER_DOCKER_NETWORK_NAME --rm --tty CONTAINER_NAME -kl -t TIME_OUT -n NUMBER_OF_REQUESTS -c NUMBER_OF_CONCURRENCY http://CONTAINER_NAME/
docker inspect CONTAINER_NAME -f "{{json .NetworkSettings.Networks }}" # Get the network interface name
docker run --network=WEB_CONTAINER_DOCKER_NETWORK_NAME --rm --tty taherbs/ab -kl -t 60 -n 10 -c 10 http://CONTAINER_NAME/

Useful Articles