We build containers on docker swarm, and then connect to them using the universal control panel and selecting console. The problem with this is the interface is very limited. You cannot copy and paste, and if you leave the screen for even a few seconds when you come back you need to reconnect, losing your command history and putting you back into the default directory.
I would like to know if there is a way to enable telnet in the container so that I can connect to it from another machine on the network using putty. I assume I will have to put something into my startup file in order to accomplish this.
Obviously, doing development in the current configuration it makes any kind of debugging extremely difficult.
This would be bloody easy with Kubernetes, where you are able to exec into any container of any pod in any namespace, regardess where it runs. Docker swarm does not provide an eqivalent solution.
You can only use docker exec with containers locale to a node. You have two ways to do so:
– either connect to the remote terminal of the node’s host via putty/ssh and execute docker exec there
– or register the nodes in docker context and switch the context (as in remote docker enging) before you execute docker exec, which will execut commands in the local terminal, but sends the commands to the target docker engine.