【问题标题】:How to run K6 through docker with influxdb and Grafana如何使用 influxdb 和 Grafana 通过 docker 运行 K6
【发布时间】:2020-09-22 13:27:17
【问题描述】:

我正在尝试使用 docker-compose 执行我的 k6 测试,然后在 grafana 中可视化结果。我已经启动了我的容器,然后尝试编辑文档中给出的命令:

docker-compose run -v     \$PWD/samples:/scripts \k6 run     /scripts/es6sample.js

但我不断收到错误消息,我很难理解命令所需的模式。我想运行下面截图中的 test.js 文件:Repo format

我收到的错误是:

ERROR: for k6_k6_run  Cannot create container for service k6: invalid volume specification: '/Documents/practice_k6/k6/tests:tests:rw': invalid mount config for type "bind": invalid mount path: 'tests' mount path must be absolute

ERROR: for k6  Cannot create container for service k6: invalid volume specification: '/Documents/practice_k6/k6/tests:tests:rw': invalid mount config for type "bind": invalid mount path: 'tests' mount path must be absolute
ERROR: Encountered errors while bringing up the project.
Eoins-MacBook-Air:k6 eoincorr$ 

【问题讨论】:

    标签: javascript docker docker-compose k6


    【解决方案1】:

    对于我发现问题的任何感兴趣的人,它位于 docker-compose.yml 文件中的卷中。 K6 中的卷输入错误tests:tests 而不是tests:/tests

    【讨论】:

      【解决方案2】:

      可以参考我创建的文档here 以使用 docker-compose 设置。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2023-03-30
        • 1970-01-01
        • 2018-04-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多