Public | Automated Build

Last pushed: 2 years ago
Short Description
ryandub's docker locust, on the hub
Full Description


Dockerfile to create Docker containers for Locust load testing tool.

Build or Image

You can either build your own image using the included Dockerfile or just pull the existing image from the Docker Index.

Build container:

$ docker build .

Pull image:

$ docker pull ryandub/locust


The following usage instructions assumes Docker >= 0.5.3 and your running
user in the docker system group (to prevent needed sudo usage).

Run in Single node mode:

$ docker run -d -e host='http://<insert_target_host>' -v `pwd`/locustfiles:/opt/locustfiles ryandub/locust locust -f /opt/locustfiles/

Run as Master:

$ docker run -d -e host='http://<insert_target_host>' -p 8089:8089 -p 5557:5557 -p 5558:5558 -v `pwd`/locustfiles:/opt/locustfiles ryandub/locust locust --master -f /opt/locustfiles/

Run as Slave:

$ docker run -d -e host='http://<insert_target_host>' -v `pwd`/locustfiles:/opt/locustfiles ryandub/locust locust --slave --master-host=<ip_of_docker_host> -f /opt/locustfiles/

The included is just an example that uses an evironment variable to load information. To use your own locustfile, just change -v `pwd`/locustfiles:/opt/locustfiles to point to your own locustfile.

Once your master/standalone container is running, connect to your Docker host on 8089 to access the webui.

Docker Pull Command
Source Repository