Hi, all,
I’m new to Docker and I have encountered my first error that I can’t seem to overcome or troubleshoot through. I need to use a Bind mount to mount a file I’m working with inside a container, but every rendition of my file path I try results in the following error:
docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: 'C:\QIIME2\Indiana\Run2' mount path must be absolute. See 'docker run --help'.
This is the command I’m running:
docker run --rm -t -i --mount type=bind,source=C:\QIIME2\Indiana\Run2,target=C:\QIIME2\Indiana\Run2 bwawrik/qiime count_seqs.py -i IndFun_S1_L001_R1_001.fastq -o seq_counts.txt
Approaching the issue using a Volume in place of a Bind results in a similar error:
docker run --rm -t -i -v C:\QIIME2\Indiana\Run2 bwawrik/qiime count_seqs.py -i IndFun_S1_L001_R1_001.fastq -o seq_counts.txt
docker: Error response from daemon: invalid volume spec "C:\\QIIME2\\Indiana\\Run2": invalid volume specification: 'C:\QIIME2\Indiana\Run2': invalid mount config for type "volume": invalid mount path: '\QIIME2\Indiana\Run2' mount path must be absolute. See 'docker run --help'.
I was led to this approach from a tutorial I’m working through for a different container (where I don’t have this issue) that has me define my Volume as C:\QIIME2\Indiana\Run2:/data. When I include the “:/data” bit at the end of the above command, Docker executes the command and runs the container script, which then fails to locate my file:
docker run --rm -t -i -v C:\QIIME2\Indiana\Run2:/data bwawrik/qiime count_seqs.py -i IndFun_S1_L001_R1_001.fastq -o seq_counts.txt
Error in count_seqs.py: No filepaths match pattern/name 'IndFun_S1_L001_R1_001.fastq'. All patterns must be matched at least once.
I’m not entirely sure what “:/data” does, so that is part of my problem. When I include that end to my file path when using a Bind instead of a Volume, I still get the same error:
docker run --rm -t -i --mount source=C:\QIIME2\Indiana\Run2:/data,target=C:\QIIME2\Indiana\Run2:/data bwawrik/qiime count_seqs.py -i IndFun_S1_L001_R1_001.fastq -o seq_counts.txt
docker: Error response from daemon: invalid mount config for type "volume": invalid mount path: 'C:\QIIME2\Indiana\Run2:/data' mount path must be absolute. See 'docker run --help'.
For reference, here is the command from the other container tutorial that executes perfectly with no file path errors and takes the files located in the folder and generates new files in the same folder on my C: drive:
docker run --rm -t -i -v C:\QIIME2\Tutorials\qiime2-importing-tutorial:/data qiime2/core:2017.9 qiime tools import --type EMPSingleEndSequences --input-path emp-single-end-sequences --output-path emp-single-end-sequences.qza
I’ve spent three days trying to wrap my head around this issue and I’m at a complete loss. Any help with this would be greatly appreciated. Again, I’m pretty new to all of this so any information, such as why that :/data changes my error message or how to execute this properly, is welcome.
Thanks.