Evg*_*y Z 2 macos docker docker-compose
我无法将本地文件夹安装到 docker-compose 上的 docker 卷,因此无法在 docker-compose run cmd 上访问它。
这是来自 github https://github.com/up1/demo-k6-docker的存储库
当我按照自述文件进行操作时,docker-compose run k6 run scripts/sample.js它总是出现以下错误:
WARN[0000] The moduleSpecifier "scripts/sample.js" has no scheme but we will try to resolve it as remote module. This will be deprecated in the future and all remote modules will need to explicitly use "https" as scheme. ERRO[0000] The moduleSpecifier "scripts/sample.js" couldn't be found on local disk. Make sure that you've specified the right path to the file. If you're running k6 using the Docker image make sure you have mounted the local directory (-v /local/path/:/inside/docker/path) containing your script and modules so that they're accessible by k6 from inside of the container, see https://k6.io/docs/using-k6/modules#using-local-modules-with-docker. Additionally it was tried to be loaded as remote module by prepending "https://" to it, which also didn't work. Remote resolution error: "Get "https://scripts/sample.js": dial tcp: lookup scripts on 127.0.0.11:53: no such host"
尝试过:
我真的很感激一些帮助,用这个把我的头撞在墙上几天
小智 8
尝试这个。
docker-compose run k6 run //scripts//sample.js
Run Code Online (Sandbox Code Playgroud)
我在 docker 桌面版本 3.1.0 Windows 10 pro 上运行。
| 归档时间: |
|
| 查看次数: |
6008 次 |
| 最近记录: |