Search code examples
docker-composek6

Running K6 with docker-compose creating a new container instead start an old one


I using K6 + InfluxDB + Grafana with docker-compose, but i got a problem.

After create and start new containers using docker-compose up -d grafana influxdb when i run k6 using docker-compose run k6 run a new container is created instead start an old one.

enter image description here

I followed step by step of this tutorial.

Have you guys any ideas?


Solution

  • The solution is put --rm in the command: docker-compose run --rm k6 run. Find solution here.