如何在“ Central&quot”容器中访问Docker容器中的单独CLI工具?

发布于 2025-01-30 09:39:45 字数 304 浏览 2 评论 0原文

我想创建一种工具,将其他CLI工具(约10个,可能更多)融合在一起以自动化一些东西。该工具需要能够仅在任何VPS上放入并进行工作,因此可以使用Docker容器。在这种情况下,工作意味着运行中央程序(由我制作),该程序会协调所有其他工具,并在单个数据库中汇总其结果以稍后浏览/导出。工具的容器需要具有网络访问。

在我对Docker的有限了解中,我得出的结论是,在一个容器中适合所有工具的多阶段构建在这里是一个不好的设计,而且非常麻烦。我已经想过将工具的容器与中心设备进行联网并进行某种TCP管道,但这似乎也不是理想的。这里的方法应该是什么样的?这个问题有一些现成的解决方案吗? 谢谢

I want to create a tool that couples together a lot (~10, perhaps more) of other CLI tools to automate some stuff. This tool needs to be able to just be dropped-in on any VPS and work, hence the Docker containers. Work in this case means running central program (made by me) that orchestrates all the other tools and aggregates their results in a single database to browse/export later. The tools' containers need to have network access.

In my limited knowledge of Docker I've concluded that multi-stage build to fit all the tools in a single container is a bad design here, and very cumbersome. I've thought of networking the tools' containers to the central one and doing some sort of TCP piping, but that seems less than ideal too. What should the approach here be like? Are there some ready-made solutions to this issue?
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

过气美图社 2025-02-06 09:39:45

docker-compose

您可以使用此工具将所有Dockerized工具部署在Docker网络中,然后通过您的编排与它们进行通信。此外,您可以将此组成的码头装箱包装到另一个码头机中,并创建docker in docker环境,并仅将您的编排者视为通往一对一工具的大门。

干杯,

How about docker-compose?

You can use this tool to deploy all your dockerized tools inside docker network and then communicate with them via your orchestrator. Additionally you can pack this composed dockers into another docker and create docker-in-docker environment and expose only your orchestrator as a gate to your all-in-one tool.

Cheers,

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文