Docker Unable to Access to Volume with Screen for Mac

Rocky Chen
2 min readNov 27, 2020

Situation

When I tried something with Docker volume, I wanted to check the volume contents from the host file system. Here is the command I used to create the container with a data volume specified:

docker container run -it --name mycntnr -v /mydata ubuntu:latest /bin/bash

Then, I also created 3 empty file in the volume /mydata:

touch a b c

However, I followed the instruction to check the volume from the Docker host system (my Mac OS) with the following command:

sudo screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

It returned me a message of “Operation not permitted” and then quitted from the screen. I did some researches online and most of the solutions do not work for me.

My Docker Desktop for Mac version: 2.5.0.1 (49550)

Issue

But another piece of information was found to be related to my problem exactly in Docker’s Github issue list (#4822) reported on Jul 31 which is still open when I write this post.

Workaround

Per the issue description and replies in the thread, a workaround is to enter the shell of the Docker VM and then the volume could…

--

--

Rocky Chen

SRE | Cloud Engineer | AWS Certified Solutions Architect – Professional