Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locust docker container cannot find the locust file

Tags:

locust

I try to run locustfile in locustio/locust docker image and it cannot find the locustfile, despite the locustfile exists in the locust directory.

~ docker run -p 8089:8089 -v $PWD:/locust locustio/locust locust -f /locust/locustfile.py
Could not find any locustfile! Ensure file ends in '.py' and see --help for available options.

(I'm reposting this question as my own, because the original poster deleted it immediately after getting an answer!)

like image 344
Cyberwiz Avatar asked Oct 12 '25 06:10

Cyberwiz


1 Answers

Remove the extra "locust" from your command, so that it becomes:

docker run ... locustio/locust -f /locust/locustfile.py
like image 132
Cyberwiz Avatar answered Oct 14 '25 19:10

Cyberwiz