Docker Community Forums

Share and learn in the Docker community.

How to "docker attach" to a hosted container

(Cap10bill) #1

I’m part of an organization for our

My .docker/config.json points to

I have a service running in a stack, there are many stacks running this service “app-svr-9” for example

Need to attach to debug the system, is part of a 10+ different service all integrated in the stack.

I need to attach, so “docker attach --name ???” or “docker attach ???” I’ve used a bunch for variances of the organization and name.

So assuming some like this

Organization: my-org
Stack: demo-stack-3
Service: app-svr-9

how to I connect. I’ve done
"docker login"
"docker build myorg/svc-9:tag3"
“docker push myorg/svc-9:tag3” — the build it put up.

I’ve update my stack to using the edit stack to use tag3 now. and it updates. How do I connect to the console using docker attach. I don’t want to use the Terminal from the browser if possible

(Sam) #2

it appears docker attach is for local connections only

so you would have to ssh , or putty to the docker HOST running the container you want to attach to…

as u have to ssh, why not just go to the container an skip the middleman