Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I am getting Screen is terminating error in MacOS

When trying to enter into Docker VM in mac, I am getting screen is terminating error whereby I cannot go into Docker Desktop. In Mac, Docker host is not the mac as it runs as a VM. Any solutions?

r

Thank you for the help.

like image 315
sonam wangmo Avatar asked Aug 17 '20 06:08

sonam wangmo


1 Answers

Workarounds

I think it's a bug since version 2.3.0.4 of Docker Desktop for Mac, as I have used screen successfully to access the Docker VM in the past on Mac without this issue. (edit: this issue appears to be still present at version 2.4.0.0)

There are some alternative methods to access the Docker VM. Here is one that worked for me:

workaround method 1

run this command to enter shell of the Docker VM:

docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh

Then you can do what you need to do at the usual location for Docker volumes:

/ # 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 31 00:51 ..
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 31 00:51 metadata.db

workaround method 2

Here's another one that also worked for me.

Run this command to enter shell of the Docker VM:

docker run --rm -it --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n sh

As before, here is where the Docker volumes' directories are:

/ # 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 31 00:51 ..
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 31 00:51 metadata.db
like image 142
Steve Goossens Avatar answered Oct 12 '22 14:10

Steve Goossens