Skip to main content

Posts

Showing posts from May, 2018

Isolated - Scalable Performance Testing: Locust in Dockers

I have shared some posts how to run Locust in Local or in Cloud, as slave or master. At this time I want to share how you can run it in a Docker. To fully get the benefits of Locust I am using it with Python 3 so I created a Docker file and images upload to the Docker Hub , and the project is on the GitHub .  The Dockerfile has the minimum available requirements but we also have a new file called `requirements.txt` which you can add required python libraries to install inside the container by pip install lib . The Dockerfile is: When you got the docker-locust image, you can now run your script. At the end of the Dockerfile you can see that ENTRYPOINT [ "/usr/local/bin/locust" ] this enable us to use the image as service  which means that you can directly call it same as using Locust installed locally. See the run command below: Running Locust in a Docker Running the Locust with my image is pretty simple if you used without docker, just try other options w