Docker bind mount is not recognizing fastq files in local storage from docker container
1
0
Entering edit mode
2.5 years ago
f.wu • 0

Hello, I am using Docker to run a primer design pipeline https://github.com/UMCUGenetics/SHARC and am having issues with mounting my data to the container. The command I have been running is:

docker run --mount type=bind,source="($PWD)"/sharc_data,destination=/tmp -it jaesvi/sharc --fastqdir /tmp/sample_data

The fastq data is located in the sample_data directory, but when the container is run I keep getting the error: "Fastq directory /tmp/sample_data does not exists."

I have tried several variations of the source-destination pairing such as typing out the explicit path for source. And a multitude more for destination. Regardless I either get that "No such file or directory exists", "No fastq files were found in directory " ".

Where do I have to mount my local drive in the container, and how would I reference the path to the fastq file in my docker run call? Been stuck on this for a while so any help would be appreciated!

Docker Mount Container Bind Fastq • 1.3k views
ADD COMMENT
0
Entering edit mode

What does the output from docker container inspect --format '{{ index .Mounts }}' YOURCONTAINERNAME show? Does the mounting work?

ADD REPLY
0
Entering edit mode

When run on the previous container I get:

[{bind  /Users/lab/Desktop/bioinformatics/sharc_data/sample_data/testdir /data/sample_data   true rprivate}]

So it looks like our bind mount is working, but we still don't get any output when running the command, our output folders are empty.

ADD REPLY
1
Entering edit mode
2.5 years ago
ATpoint 85k

So I guess it must be destination=/tmp/sample_data, no? Isn't it that the content of source is mounted as destination so everything inside sharc_data is now in /tmp (not recursively) but you would need to create the sample_data folder or drop sample_data from --fastqdir

enter image description here

ADD COMMENT
0
Entering edit mode

Thank you very much this was very helpful! I was able to access my local directory through the Docker container. To take my inquiry one step further, in specifying an output directory in which to put the output of this pipeline, would I have to pass a local directory or a container directory to the pipeline? If I have to specify a container directory, how would I then access that data on my local machine?

ADD REPLY

Login before adding your answer.

Traffic: 2027 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6