You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To do input/output with a detached container use network connections or shared volumes. These are required because the container is no longer listening to the command line where docker run was run.
This means that you should probably mount the current directory inside of the docker and run the script from there
docker run -v "`readlink -f .`:/opt" -d loadimpact/k6 run /opt/script.js
-i can be dropped as -d negates it.
Side note: for infinite duration in the future only the manual-executor/manually-controlled (name is still discussed) executor/scheduler will have infinite duration. The executor in question is what will be controlled with the current and future REST API.
For all other executors there will be no infinite duration (at least for now), but for practical implication -d 2000h will probably suffice.
If you provide us with your use case it will be put into consideration for future(and current) plans and changes to the code.
Thanks for the prompt response. Your hints got me there.
I am actually using ansible so here's the working docker_container code in case it helps someone else.
I am having issue running k6 in detached mode.
docker run -i loadimpact/k6 run -<~/k6/script.js
works fine:Adding the
-d
flag seems to make it fail after printing the logo:If it matters, here's my script.js:
Side note: What's the new correct way of specifying an infinite duration, since
duration: 0
is deprecated?The text was updated successfully, but these errors were encountered: