{"id":20279922,"url":"https://github.com/sernst/locusts","last_synced_at":"2026-03-08T09:37:49.548Z","repository":{"id":55909941,"uuid":"92741758","full_name":"sernst/locusts","owner":"sernst","description":"Locust.io docker container for Python 3.8+","archived":false,"fork":false,"pushed_at":"2020-12-08T16:00:10.000Z","size":16,"stargazers_count":26,"open_issues_count":3,"forks_count":23,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T04:28:47.685Z","etag":null,"topics":["docker","load-testing","locusts-docker-image","python","python-3","swarm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sernst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-29T13:17:50.000Z","updated_at":"2023-06-02T12:07:20.000Z","dependencies_parsed_at":"2022-08-15T09:10:47.527Z","dependency_job_id":null,"html_url":"https://github.com/sernst/locusts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sernst%2Flocusts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sernst%2Flocusts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sernst%2Flocusts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sernst%2Flocusts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sernst","download_url":"https://codeload.github.com/sernst/locusts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248357807,"owners_count":21090400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","load-testing","locusts-docker-image","python","python-3","swarm"],"created_at":"2024-11-14T13:33:44.908Z","updated_at":"2026-03-08T09:37:49.515Z","avatar_url":"https://github.com/sernst.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Locusts Docker Image\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Code style: flake8](https://img.shields.io/badge/code%20style-flake8-white)](https://gitlab.com/pycqa/flake8)\n[![Code style: mypy](https://img.shields.io/badge/code%20style-mypy-white)](http://mypy-lang.org/)\n\nThe locusts docker image is designed for easily composing multi-container \n[locust.io](http://http://locust.io/) \nload testing swarms using Python 3.8+. The locusts image functions can function\nas either a main or worker depending on whether or not the `--master-host` \nflag is specified in a container's run execution call.\n\nThe docker image is available in \n[Docker Hub](https://hub.docker.com/r/swernst/locusts/). You can pull the \nimage with the command:\n\n```bash\n$ docker pull swernst/locusts:latest\n```\n\n## Main \u0026 Workers\n\nThe optional `--main-host` argument is used to specify that the container \nshould be a worker and communicate with the main with the specified host.\nFor example:\n\n```bash\n$ docker run -it --rm \\\n    -v ./scripts:/scripts \\\n    swernst/locusts \\\n    --main-host=127.0.0.1\n```\n\nwould specify a worker container where the main resides at the local\n`127.0.0.1` host location.\n\n## Script Volume\n\nA locusts container requires that a volume be mounted to the container's \n`/scripts` directory. It expects to find the *locustfile.py* to run in that \ndirectory as well as a *locust.config.yaml* file.\n\nAlternatively, this image can be used as a base image and the files copied\ninto the scripts directory of the built container image.\n\n## Docker Compose\n\nThe multi-container environment is easily specified using docker compose. You \ncan see an example in this repository of how that would look:\n[docker-compose.yml](docker-compose.yml)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsernst%2Flocusts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsernst%2Flocusts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsernst%2Flocusts/lists"}