【问题标题】:How can i use Volume command for display the result to stop the container如何使用 Volume 命令显示停止容器的结果
【发布时间】:2018-04-23 12:31:17
【问题描述】:

如何使用 Volume 命令显示停止容器的结果

例如:- 我将 JMeter HTML 报告保存在我的容器中,但在该容器自动停止之后。 所以有人建议我使用 docker VOLUME 命令来运行 HTML。

这怎么可能有人可以帮助我。

dockerfile 最后一行是 运行 ./bin/jmeter -n -t ./bin/Get_Ping_Node_API.jmx -l ./bin/result.jtl -e -o ./bin/Result_Html

【问题讨论】:

标签: docker jmeter dockerfile


【解决方案1】:

尝试将-v /path/in/the/host/machine:/path/to/html/directory/inside/container 添加到您的docker run 命令中。你最终会得到如下命令:

docker run -v /home/ubuntu/sumit/TEST:/opt/apache-jmeter-4.0/bin/result_html jmeter123:latest

【讨论】:

  • 您没有指定图片,请参阅我的更新答案。
  • 你有dorpbox的共享截图链接吗??..你的共享命令不起作用,实际上问题是,html报告保存在容器中,容器停止。
  • 在你分享的截图中,你只构建了一个镜像,你没有创建一个容器,所以命令docker run ...从一个镜像创建一个容器。
  • docker run -v /home/ubuntu/sumit/TEST:/opt/apache-jmeter-4.0/bin/result_html jmeter123:latest --- 工作,但是我如何在我的dockerfile中添加它带有时间戳文件夹名称
猜你喜欢
  • 2023-03-14
  • 2015-11-27
  • 1970-01-01
  • 1970-01-01
  • 2016-11-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-05-27
相关资源
最近更新 更多