【问题标题】:Error on command: docker run direvius/yandex-tank命令错误:docker run direvius/yandex-tank
【发布时间】:2019-10-22 08:47:06
【问题描述】:

我刚开始使用yandex-tank,第一步失败了。

我正在尝试执行命令

docker run direvius/yandex-tank

得到一个错误:

Traceback (most recent call last):
  File "/usr/local/bin/yandex-tank", line 11, in <module>
    load_entry_point('yandextank==1.12.1', 'console_scripts', 'yandex-tank')()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/cli.py", line 130, in main
    log_handlers=handlers
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 327, in __init__
    self.config_list = self._combine_configs(configs, cli_options, cfg_patches, cli_args, no_local)
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 354, in _combine_configs
    parse_and_check_patches(cfg_patches) + \
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 77, in load_cfg
    with open(cfg_filename) as f:
IOError: [Errno 2] No such file or directory: 'load.yaml'

我的环境是 Windows。而且我不明白如何在不运行容器的情况下添加 load.yaml?没有load.yaml我无法运行容器

【问题讨论】:

  • 我猜你需要一些额外的选项。这是一组运行它的配置,它们都需要您使用的其他东西。 yandextank.readthedocs.io/en/latest/install.html
  • 如前面的评论中所述 - 安装文档清楚地说明了所需的内容,包括应该是 load.yaml 文件的卷安装
  • 我刚刚提到错误不提供信息

标签: docker yandex-tank


【解决方案1】:

yandex-tank 使用目录中的load.yaml 作为默认配置文件。但是容器的镜像没有https://github.com/yandex/yandex-tank/blob/develop/docker/Dockerfile这样的文件。

鉴于它的入口点会立即启动 yandex-tank,我猜你需要创建一个新图像,使用 FROM direvius/yandex-tankCOPY 作为该图像的基础配置,或者作为默认值 load.yaml ,或使用不同的名称/路径(在这种情况下,您必须在运行映像时使用-c 选项)。

你不能运行direvius/yandex-tank然后docker cp load.yaml &lt;container_path&gt;,因为从你运行容器的那一刻起,它就会崩溃并出现你得到的错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-25
    • 2019-03-27
    • 2018-02-16
    • 2018-02-23
    • 1970-01-01
    • 2016-05-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多