hi Team , i tried to run k6 as docker image on our aws ec2 , i want to run it in background but the script never runs , in back ground , it always runs on foreground, and i dont want to leave my system up till the test completes, if i run as docker in background the script just prints the k6 banner in docker logs, thats it.
1 Like
Hi @sandeeprawat,
It will be helpful if you provide the commands you are running as to be able to tell you what doesn’t work .
You can look at the running k6 documentation and specifically click on the docker
tabs and read the corresponding notes about docker usage.
1 Like
hi this is the command i am running , but i want to to run k6 as docker in background i dont want to keep my system up till the time script is running
docker pull artifactory-dockerhub.cloud.abc.com/loadimpact/k6
docker run --network=host -i artifactory-dockerhub.cloud.abc.com/loadimpact/k6:latest run - <loadscript.js
@sandeeprawat For docker run -d
to work, you’ll need to bind mount your script directory or use a Docker volume.
See this issue and the k6 docs for details.
1 Like