How to mount my data into docker container through -v command?
1
0
Entering edit mode
5.6 years ago
Farah ▴ 80

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 • 2.6k views
ADD COMMENT
0
Entering edit mode

Have you checked docker volumes help online?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 ....

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode
5.5 years ago
Eric Lim ★ 2.2k

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:/#
ADD COMMENT
0
Entering edit mode

Thank you very much.

ADD REPLY

Login before adding your answer.

Traffic: 2711 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