docker-k6-grafana-influxdb
docker-k6-grafana-influxdb copied to clipboard
Error running the docker-compose run k6 run /scripts/ewoks.js
Hi @luketn how are your? I am writing you since i am having an error running the docker-compose run k6 run /scripts/ewoks.js
I have clone the repository and from docker-k6-grafana-influxdb folder after running the docker-compose up -d influxdb grafana
(the container is running)
But when i run the docker-compose run k6 run /scripts/ewoks.js
I am getting the following error:
Do you know what could be the root cause? i am running from mac
Thanks a lot isn advance!
@FJLopezGarcia you can try to change k6 version to loadimpact/k6:0.34.1
For me as a windows user it worked when I edited the files as follows:
docker-compose.yml
k6:
image: loadimpact/k6:latest
entrypoint: /bin/sh
user: root
networks:
- k6
ports:
- "6565:6565"
environment:
- K6_OUT=influxdb=http://influxdb:8086/k6
volumes:
- ./scripts:/scripts
run-load-test.sh
docker compose up --build -d influxdb grafana
echo "--------------------------------------------------------------------------------------"
echo "Load testing with Grafana dashboard http://localhost:3000/d/k6/k6-load-testing-results"
echo "--------------------------------------------------------------------------------------"
docker compose run --rm -it k6
Then I run this bash command from root directory:
./run-load-test.sh
Inside docker container terminal I run following command:
k6 run /scripts/ewoks.js
Problem was in resolving path to ewoks.js script. When I ran command docker compose run --rm k6 run /scripts/ewoks.js
, the path to script was resolved in my Windows context and not in k6 container context. So docker container tried to run script located in C:/Program Files/Git/scripts/ewoks.js
.