Skip to content

taherbs/Docker-ab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4d302d6 · Sep 25, 2018

History

7 Commits
Sep 6, 2018
Sep 6, 2018
Sep 25, 2018
Sep 25, 2018

Repository files navigation

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