I try to connect vm by command:
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
and got this:
Asked
Active
Viewed 3,924 times
5

dangreen
- 339
- 2
- 11
-
What command did you start your docker container with? I can't reproduce this. – jaxxstorm Nov 25 '16 at 10:24
-
@Frap its not a docker container, its host linux vm from Docker for macOS https://github.com/docker/for-mac#component-projects – dangreen Nov 25 '16 at 14:00
1 Answers
4
I add the same issue after running
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
then closing my terminal and running that command again.
To fix try to do in the screen:
CTRL+A CTRL+\ followed by "y"

Baptiste Mesta
- 579
- 4
- 8
-
2This is needed because if you just close the terminal window, screen is still connected to that TTY in background (detached)... so you can (in new terminal window) list sessions with `screen -ls` and then re-enter the session with `screen -r`, then properly exit with `ctrl-a, k` – Bret Fisher Feb 11 '17 at 17:35
-
I added all the commands with notes you need to connect to VM in a gist https://gist.github.com/BretFisher/5e1a0c7bcca4c735e716abf62afad389 – Bret Fisher Feb 24 '17 at 08:12
-
As of Docker 18.03.0-ce-mac59, the path to the tty is `Library/Containers/com.docker.docker/Data/vms/0/tty`. – mirzmaster Mar 27 '18 at 20:30
-
I don't know when it happened but as far as I can tell there is no longer a way to connect to the Docker VM using screen. I'm running Docker Desktop 2.3.50 (latest at the time of this comment). No matter the permissions on the `tty` node, you get `Permission denied`. – Aug 24 '20 at 17:14
-
1@dpk, I see the same issue (`screen` tty to Docker VM not working) in 2.3.0.4. There are alternative methods which work to access the Docker VM, and as an added bonus, they don't exhibit the garbled output from `screen`: https://stackoverflow.com/questions/63445657/why-i-am-getting-screen-is-terminating-error-in-macos/63595817#63595817 – Steve Goossens Aug 26 '20 at 11:09