moby: docker attach [container] hangs, requires input

Hi everyone, When I docker attach [container] docker hangs for a second, but it’s not really hanging, it just requires input to get to the container shell.

This doesn’t seem so bad but it can be confusing if you’re expecting the shell to just come up.

Figured I’d just get this up here, even if it’s low priority and see what everyone says.

Cheers.

docker version Client version: 1.2.0 Client API version: 1.14 Go version (client): go1.3 Git commit (client): fa7b24f OS/Arch (client): linux/amd64 Server version: 1.2.0 Server API version: 1.14 Go version (server): go1.3 Git commit (server): fa7b24f

uname -a Linux phoenix 3.17.0-rc7 #1 SMP Sun Oct 12 01:35:13 MDT 2014 x86_64 Intel® Core™2 Duo CPU E7400 @ 2.80GHz GenuineIntel GNU/Linux

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 43 (18 by maintainers)

Commits related to this issue

Most upvoted comments

docker exec -it [container-id] bash worked for me.

+1 Furthermore, it completely takes over the terminal while “waiting for input”, and does not respond to ctrl+z, ctrl+z, etc, leaving me with the option of closing the entire teminal window on my end (which in my case also terminates the ssh session to the Docker server)

My question is how did this become a feature if it doesn’t work?

@stramel I don’t understand the question. But this is fixed and will be available in 1.11.

I am having this issue on v1.10.3. Is the accepted way of doing this using docker exec -it <container> bash?

USER POLL

The best way to get notified when there are changes in this discussion is by clicking the Subscribe button in the top right.

The people listed below have appreciated your meaningfull discussion with a random +1:

@kylechadha @bosswissam