Going bald over trying to mount a local directory

Hi all,

New to docker and really struggling with the below issue, despite reading multiple forums/guides. Thanks in advance.

I am trying to run a docker image from gitlab named romanhaa/xenocell

I am using OS 14.0 w/ docker desktop 4.24.2 but running all commands from terminal

The docker image relies on local files and directories to create an output. My Local files are stored @ “/Volumes/Samsung_T5/PDX_92723/”

I am having trouble mounting this file to the docker image. When I try to input the following command I get an absolute mount path error (also posted below).

docker run -v /Volumes/Samsung_T5/PDX_92723:var/lib/mydata romanhaa/xenocell generate_index --host mm10.fa --graft ‘hg38.fa’ --output test_index --threads 16 --memory 60

invalid mount config for type “bind”: invalid mount path: ‘var/lib/mydata’ mount path must be absolute.

I have tried multiple container destination paths to mount the data, but I think this is where my poor understanding is hampering me. Am I going about this all wrong?

The only other thing I have tried is just running the container, thinking that perhaps I would need to mount the drive after the container was initiated. However; whenever I try to run the container, it just immediately exits (despite trying the commands -it to create an interactive bash terminal).

Thank you so much in advance,

needs to be

-v /Volumes/Samsung_T5/PDX_92723:/var/lib/mydata

The leading slash in the container path makes it an absolute path. You commands lacked the leading slash, which made it a relative path.

Furthermore, please let us know how this topic is related to the Docker Hub category you posted in.


Does Mac OX use a different container path by default? I think this is the part I’m struggling with. I don’t know the destination container path to put it to. It seems /var/lib works for windows and linux, but Mac uses a virtual desktop to run container paths?

Like when I run the above command it says “unable to get absolute bin path: stat .: no such file or directory”

So sorry, edited the section tag to put this in the right place

Always use the container path as described in the image description. Images are often opinionated when it comes to things like what environment variables exist, what port the application listens on and what folders are supposed to be volumes.

Volumes and ports follow the pattern “host-side:container-side” → only modify the host-side, unless you know how to configure the application to use the changed container-side.
Environments follow the pattern “key=value” → only modify the value.

Thank you for moving the topic in the right category.

Note: Docker requires Linux kernel features and modules, and Linux libraries and binaries to work. Docker Desktop provides the Docker Engine in a Linux utility-vm (regardless whether your host OS is macOS, Windows or Linux).


I think the problem is, I can’t figure out the container path as provided in the image description. When I run the image it automatically closes (I assume because I can’t provide the right inputs, because I can’t link my folders). I’ve checked out the information at the source website as well, and it doesn’t seem to mention anything about a container path for the data: Docker/Dockerfile · master · XenoCell / XenoCell · GitLab

Am I just going about this all wrong?


Please do not paste text content as image, paste it as Preformatted text instead (</> icon, depending on your monitors resolution it can be in the submenu of the gear icon).

The Readme.md of the git project does not mention any volumes. You try to run an image for the linux/amd64 platform on am arm cpu. Docker Desktop allows to emulate other platforms, by using the --platform parameter:

docker run --platform linux/amd64 romanhaa/xenocell`

You picked an image that appears to be not well documented. I suggest you get in touch with the image maintainer if you have questions about how to use their image.