This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to mount my data into docker container through -v command?

Hello,

I am using docker container for my RNAseq analysis. I am also using Windows PowerShell. However, I am quite new in using docker, container, and bash.

At the beginning of RNAseq analysis, I need to perform quality control of my raw data using FastQC. For this, I am using the container from the workshop. However, first I need to mount my data into the docker container.

I put my raw data folder into my pen drive (USB flash drive), and the path of my data folder is F:\mary. Mary folder contains 10 fastq.gz data files with different names (e.g. 20120215_WT_5_R1.fastq.gz).

I would highly appreciate if you can help me that how can I mount my data into the container.

How can I find that what is the data directory in container in my pc? Should I create a folder somewhere in my pc? or there is already a place in the container that I should just find its path? What should I write in the below code in the question mark part?

$ docker run -d -p port in host:port in container -v F:\mary: ????? name of the container

Many thanks for your help.

Best wishes,

rna-seq docker container bash scripting

Yes, I have checked the help online. However, again in their example (the below code), I do not where did they find this path (/app) from? $ docker run -d \ --name devtest \ -v myvol2:/app \ nginx:latest

Don't exactly know the difference in PC. There are generally two ways. Assuming the contents of the folder you're adding do not change post-build, you can define something like ADD . /directory/inside/the/container in your Dockerfile and run docker as usual. Alternatively, you can use docker run -v /directory/of/your/computer:/directory/inside/the/container ....

To use docker run -v /directory/of/your/computer:/directory/inside/the/container ....

May I know what is "the directory inside the container" that I should use? and also how can I find this directory?

1 answer

Whatever you want.

[/scratch/oligo_designer]$ ls references/
GRCh38
[/scratch/oligo_designer]$ docker run -it -v /scratch/oligo_designer/references:/whatever/you/want/ ubuntu:18.04
root@6b3edfb69665:/# ls /whatever/you/want/
GRCh38
root@6b3edfb69665:/#

Thank you very much.

Log in to answer this question.