TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Docker CLI Plugin: Docker-swarm-proxy exec into a Docker service

1 点作者 ancieque将近 2 年前
A problem with Docker Swarm and automation with it has been that you can&#x27;t directly exec into any service from the command line. There exist some workarounds to achieve this behaviour, but in the end you want something similar and as convenient as `docker exec` but for services.<p>Recently I have been playing around with the idea of achieving this by deploying `tecnativa&#x2F;docker-socket-proxy` in the swarm, and then using this to proxy to the proper host in the swarm you want to reach. It turns out that this works like a charm.<p>I recently played with a prototype for this where you had to first deploy the `tecnativa&#x2F;docker-socket-proxy` stack into your swarm. Also you had to know which node the task was running on for this to be useful. I improved this situation. All you need to do is install the proper Docker CLI plugin I built, and you can get a shell into any service you need to. All you need is a connection to a Docker Swarm Manager:<p>docker swarmproxy service exec -it vibrant_bell bash<p><a href="https:&#x2F;&#x2F;github.com&#x2F;neuroforgede&#x2F;docker-swarm-proxy">https:&#x2F;&#x2F;github.com&#x2F;neuroforgede&#x2F;docker-swarm-proxy</a><p>Maybe this is useful for some people around here :)

暂无评论

暂无评论