Why I am getting Screen is terminating error in MacOS Why I am getting Screen is terminating error in MacOS docker docker

Why I am getting Screen is terminating error in MacOS


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 72drwx------   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 14ce94e174839f1947efa6fcbf5ac1fb2ea3b0f0b3f25311fee333ee374576b6drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 34eb2bd80931ff954e1da80c5383beb4def61129d4005432b77080531cd10a5adrwxr-xr-x    3 root     root        4.0K Aug 27 11:34 830de2ce31519c921b50c448964b54517ca4461d337b56a9fd6e5b354ace3247drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 data-layer_mongo_datadrwxr-xr-x    3 root     root        4.0K Aug 26 11:01 ebb440184703bfad17184bd5ff74b677b50d74b8f0fbdd116506a1fcacfb00cddrwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_back-end_logdrwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_front-end_logdrwxr-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 72drwx------   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 14ce94e174839f1947efa6fcbf5ac1fb2ea3b0f0b3f25311fee333ee374576b6drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 34eb2bd80931ff954e1da80c5383beb4def61129d4005432b77080531cd10a5adrwxr-xr-x    3 root     root        4.0K Aug 27 11:34 830de2ce31519c921b50c448964b54517ca4461d337b56a9fd6e5b354ace3247drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 data-layer_mongo_datadrwxr-xr-x    3 root     root        4.0K Aug 26 11:01 ebb440184703bfad17184bd5ff74b677b50d74b8f0fbdd116506a1fcacfb00cddrwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_back-end_logdrwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_front-end_logdrwxr-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