run docker exec from swarm manager

前端 未结 2 2014
挽巷
挽巷 2020-12-20 18:25

I have two worker nodes: worker1 and worker2 and one swarm manager. I\'m running all the services in the worker nodes only. I need to run from the manager docker exec to acc

2条回答
  •  暖寄归人
    2020-12-20 18:55

    Swarm mode does not currently have a way to run an exec on a running task. You need to find the container and run the exec on the host. You can configure the workers to have a TLS protected port they listen on, which would give you remote access (see docker's guide). And you can lookup the node for each task in a service by checking the output of a docker service ps $service_name.

提交回复
热议问题