Mac Docker Desktop cvmfs/service image not exposing file system contents

I’m trying to use the cvmfs/docker image to get access to CVMFS without the need to install the CVMFS client on the Mac itself. For this purpose, I’m following the docker container getting started instructions. My ultimate goal would be to have a docker-compose based setup with a code development container and the CVMFS service that exposes CVMFS to the other container. For now, however, I’m only trying to access CVMFS from the host system.

The container works using the command provided if I drop the shared option in the CVMFS mount. If I keep that option, I get an error docker: Error response from daemon: path /host_mnt/cvmfs is mounted on /host_mnt but it is not a shared mount.. Mind that I’ve added /cvmfs to the “File sharing” resources in the docker settings. It doesn’t work either if I use a mount such as $HOME/cvmfs with the shared option. Again, dropping it works.

Now, if I run

docker run -d --rm \
  -e CVMFS_CLIENT_PROFILE=single \
  -e CVMFS_REPOSITORIES=sft.cern.ch \
  -e CVMFS_PROXY=DIRECT \
  --cap-add SYS_ADMIN \
  --device /dev/fuse \
  --volume $HOME/cvmfs:/cvmfs:shared \
  cvmfs/service

I can see on the host computer that, as expected, in the $HOME/cvmfs directory two new directories are created: cvmfs-config.cern.ch and sft.cern.ch. However, these two directories are empty. If I exec into the running cvmfs/service container, these directories are not empty.

Is there any way that I can access CVMFS from outside the container on a Mac or is this a general limitation of Docker for Mac?

Apologies for the long silence! I finally got to test this on a mac node. I see what you see, and it is likely that it is a limitation in the way volume sharing works on docker/mac. I have to look into it a bit more to understand all the details. I’ll keep you posted.

Looks like the issue is known without solution: How to bind a volume with shared option? - Docker Desktop for Mac - Docker Forums

There might be an option to NFS export the volume from inside out but I don’t think it’s worth it. Probably easier to have the mac cvmfs client installed.