docker can't access to volume with screen
- [x] I have tried with the latest version of my channel (Stable or Edge)
- [x] I have uploaded Diagnostics
- Diagnostics ID: BFD655CF-D206-4905-B5AD-06447A5E3DDF/20200731174034
Expected behavior
Allows to acces by terminal to tty related to docker
Actual behavior
% screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
[screen is terminating]
%
Information
- macOS Version: 10.15.6
Diagnostic logs
- Docker for Mac: version 2.3.0.4
Steps to reproduce the behavior
- open Terminal
- screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
You can get slightly further if you run chmod 777 ~/Library/Containers/com.docker.docker/Data/vms/0/tty and run screen -m -L ~/Library/Containers/com.docker.docker/Data/vms/0/tty. In that case you'll see this in the screenlog.0 file (created by the -L flag):
/Users/dpk/Library/Containers/com.docker.docker/Data/vms/0/tty: line 1: /dev/ttys001: Permission denied
I haven't figured out how to run screen without the tty to fix the buggy permissions there.
This bug also affects version 2.3.5.0 (edge channel). I uploaded a diagnostic log as well: D7716AFD-F809-46C0-9AB4-2EE25C4697EB/20200824172454
@dpkirchner I did the command above screen -m -L and got the following:
$ cat screenlog.0 /dev/ttys005
But not sure how to proceed. Docker 2.3.0.4.
I'm not sure, you got a lot further along than I did. FWIW, I run in to exactly the same bug in 2.3.0.4 as I did in 2.3.5.0.
There's a StackOverflow comment about the issue suggesting a solution that may work for some cases: https://stackoverflow.com/a/60582083 It doesn't work for my specific use case, unfortunately, but it might help you out.
I met this issue on 2.3.0.4(46911) too. And the log is:
/Users/huyhuynh/Library/Containers/com.docker.docker/Data/vms/0/tty: line 1: /dev/ttys004: Permission denied
I tried chmod 400 , chmod 777 and sudo in front also not work :'(
Until this is fixed, here are two workaround methods that worked for me: https://stackoverflow.com/a/63595817/1456285
I have tried using method 1 from above link -> https://stackoverflow.com/a/63595817/1456285
I did enter into terminal but after that how to navigate?
Once you have terminal access to the VM, you can find the volume data in the usual place, i.e. /var/lib/docker/volumes, with subfolders for each docker volume, and _data subfolders therein for the actual data, e.g.
docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
/ # ls -lah /var/lib/docker/volumes/
total 72
drwx------ 10 root root 4.0K Aug 27 11:34 .
drwx--x--x 15 root root 4.0K Oct 9 16:07 ..
drwxr-xr-x 3 root root 4.0K Aug 26 10:44 14ce94e174839f1947efa6fcbf5ac1fb2ea3b0f0b3f25311fee333ee374576b6
drwxr-xr-x 3 root root 4.0K Aug 25 12:34 34eb2bd80931ff954e1da80c5383beb4def61129d4005432b77080531cd10a5a
drwxr-xr-x 3 root root 4.0K Aug 27 11:34 830de2ce31519c921b50c448964b54517ca4461d337b56a9fd6e5b354ace3247
drwxr-xr-x 3 root root 4.0K Aug 25 12:34 data-layer_mongo_data
drwxr-xr-x 3 root root 4.0K Aug 26 11:01 ebb440184703bfad17184bd5ff74b677b50d74b8f0fbdd116506a1fcacfb00cd
drwxr-xr-x 3 root root 4.0K Aug 27 11:27 hawakening-services_back-end_log
drwxr-xr-x 3 root root 4.0K Aug 27 11:27 hawakening-services_front-end_log
drwxr-xr-x 3 root root 4.0K Aug 27 11:27 hawakening-services_mongo_data
-rw------- 1 root root 64.0K Oct 9 16:07 metadata.db
/ # ls -lah /var/lib/docker/volumes/data-layer_mongo_data/_data/
total 1352
drwxr-xr-x 4 999 ping 4.0K Aug 27 11:35 .
drwxr-xr-x 3 root root 4.0K Aug 25 12:34 ..
-rw------- 1 999 ping 46 Aug 25 12:34 WiredTiger
-rw------- 1 999 ping 21 Aug 25 12:34 WiredTiger.lock
-rw------- 1 999 ping 1.2K Aug 27 11:35 WiredTiger.turtle
-rw------- 1 999 ping 84.0K Aug 27 11:35 WiredTiger.wt
-rw------- 1 999 ping 4.0K Aug 27 11:35 WiredTigerLAS.wt
-rw------- 1 999 ping 20.0K Aug 27 11:35 _mdb_catalog.wt
-rw------- 1 999 ping 20.0K Aug 27 11:35 collection-0--6268495467305357123.wt
-rw------- 1 999 ping 388.0K Aug 25 12:34 collection-10--6268495467305357123.wt
-rw------- 1 999 ping 132.0K Aug 26 10:14 collection-12--6268495467305357123.wt
-rw------- 1 999 ping 264.0K Aug 26 10:14 collection-14--6268495467305357123.wt
-rw------- 1 999 ping 36.0K Aug 27 11:35 collection-2--6268495467305357123.wt
-rw------- 1 999 ping 24.0K Aug 26 10:14 collection-4--6268495467305357123.wt
-rw------- 1 999 ping 28.0K Aug 25 12:34 collection-8--6268495467305357123.wt
drwx------ 2 999 ping 4.0K Aug 27 11:35 diagnostic.data
-rw------- 1 999 ping 20.0K Aug 27 11:35 index-1--6268495467305357123.wt
-rw------- 1 999 ping 40.0K Aug 25 12:34 index-11--6268495467305357123.wt
-rw------- 1 999 ping 60.0K Aug 26 10:14 index-13--6268495467305357123.wt
-rw------- 1 999 ping 64.0K Aug 25 13:47 index-15--6268495467305357123.wt
-rw------- 1 999 ping 36.0K Aug 27 11:35 index-3--6268495467305357123.wt
-rw------- 1 999 ping 24.0K Aug 26 10:14 index-5--6268495467305357123.wt
-rw------- 1 999 ping 12.0K Aug 27 11:35 index-6--6268495467305357123.wt
-rw------- 1 999 ping 24.0K Aug 25 12:34 index-9--6268495467305357123.wt
drwx------ 2 999 ping 4.0K Aug 26 10:15 journal
-rw------- 1 999 ping 0 Aug 27 11:35 mongod.lock
-rw------- 1 999 ping 36.0K Aug 27 11:35 sizeStorer.wt
-rw------- 1 999 ping 114 Aug 25 12:34 storage.bson
/ # exit
Hello am facing a other issue when trying : screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty i have a message saying No such file or directory and [screen is terminating] after
here is the way am running my docker : docker run -tid --name web -p 8080:80 --mount source=myvolume, target=/usr/share/nginx/html nginx:latest
I don't get why tty is not found. Can someone help me ?
I also get this issue.
computer: mac
os version 10.14.6
dokcer for mac version 2.4.0.0(48506)

when i want to attach into the docker vm, i run the command mentioned in this page. i get the same error.
it warn me that screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty permission denied.
in the early version docker for mac desktop, it can work.
is it a bug, hope to fix, thanks
I also don't have tty file.
ls -l ~/Library/Containers/com.docker.docker/Data/vms/0/tty
ls: /Users/xxx/Library/Containers/com.docker.docker/Data/vms/0/tty: No such file or directory
docker version
Client: Docker Engine - Community
Cloud integration: 1.0.2
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 16:58:31 2020
OS/Arch: darwin/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:07:04 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
I don't have the tty file too. I'm using latest docker desktop 2.5.0.1 for mac.
I don't have the tty file too.
Me too
I still met this issue now and my docker desktop version is: 2.5.0.1 (49550) and Channel: stable.
met this issue too:
docker version Client: Docker Engine - Community Cloud integration: 1.0.2 Version: 19.03.13 API version: 1.40 Go version: go1.13.15 Git commit: 4484c46d9d Built: Wed Sep 16 16:58:31 2020 OS/Arch: darwin/amd64 Experimental: false
Server: Docker Engine - Community Engine: Version: 19.03.13 API version: 1.40 (minimum version 1.12) Go version: go1.13.15 Git commit: 4484c46d9d Built: Wed Sep 16 17:07:04 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.3.7 GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683
Looks like they changed it to a button "CLI" in the UI see my post / img here https://stackoverflow.com/a/65203563/1484447
I don't have the tty file too. I'm using latest docker desktop 2.5.0.1 for mac.
Hello, did you find a solution ?
I don't have the tty file too. I'm using latest docker desktop 2.5.0.1 for mac.
Hello, did you find a solution ?
A workaround works for me: https://rocky-chen.medium.com/docker-unable-to-access-to-volume-with-screen-for-mac-9d016f5420e6
I don't have tty either:
Client: Docker Engine - Community Cloud integration: 1.0.4 Version: 20.10.2 API version: 1.41 Go version: go1.13.15 Git commit: 2291f61 Built: Mon Dec 28 16:12:42 2020 OS/Arch: darwin/amd64 Context: default Experimental: true
Server: Docker Engine - Community Engine: Version: 20.10.2 API version: 1.41 (minimum version 1.12) Go version: go1.13.15 Git commit: 8891c58 Built: Mon Dec 28 16:15:23 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.4.3 GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b runc: Version: 1.0.0-rc92 GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff docker-init: Version: 0.19.0 GitCommit: de40ad0
But there's a few good news here for you based on https://github.com/docker/for-mac/issues/4822#issuecomment-753418678 and in VsCode! https://stackoverflow.com/a/65645462/12882771
If you can't find your tty, it maybe because you can no longer screen into the Docker Vm on macOS. The following solution worked for me:
https://stackoverflow.com/questions/63445657/why-i-am-getting-screen-is-terminating-error-in-macos/63595817#63595817
I used "method 1":
docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
I'm on Docker 20.10.2 and macOS: 10.17.7