Search code examples
dockercentosvcf-variant-call-format

Docker unable to locate file, even with correct path given


I'm running a long docker command

docker exec -t -i 9f5865473027 cloudgene run [email protected] --files /illumina/runs/con/chrX_impute/ALL.chrX.PAR2.phase3_v5.shapeit2_mvncall_integrated.noSingleton.genotypes.vcf.gz --refpanel apps@[email protected] --conf /etc/hadoop/conf --population AFR --mode qconly --output /illumina/runs/con/chrX_impute

but this is giving an error

Error: Input Files (<a href="http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41" target="_blank">VCF</a>): file '/illumina/runs/con/chrX_impute/ALL.chrX.PAR2.phase3_v5.shapeit2_mvncall_integrated.noSingleton.genotypes.vcf.gz' not found.

why isn't docker finding a file that is given with an absolute path (even with a relative path)? How can I make docker find this file?

even when I do

docker exec -it 9f5865473027 ls /illumina/runs/con/chrX_impute/ALL.chrX.PAR2.phase3_v5.shapeit2_mvncall_integrated.noSingleton.genotypes.vcf.gz

I still get ls: cannot access /illumina/runs/con/chrX_impute/ALL.chrX.PAR2.phase3_v5.shapeit2_mvncall_integrated.noSingleton.genotypes.vcf.gz: No such file or directory

when I do docker exec -it 9f5865473027 ls . it seems to be in / or the absolute top directory, but using this information and entering the file name without / thus docker exec -it 9f5865473027 ls illumina/runs/con/chrX_impute/ALL.chrX.PAR2.phase3_v5.shapeit2_mvncall_integrated.noSingleton.genotypes.vcf.gz

Docker is still unable to find the file :(

I can see higher directories via docker's ls but the directory that I'm in is docker exec -it 9f5865473027 ls illumina/runs/con/chrX_impute mysteriously shows as empty (which it isn't)


Solution

  • The solution to this problem is to copy the file to the container. Each "container" seems to act as if it is a separate computer.

    All I had to do is

    docker cp ALL.chrX.PAR2.phase3_v5.shapeit2_mvncall_integrated.noSingleton.genotypes.vcf.gz 9f5865473027:/illumina/runs/con/chrX_impute/
    

    and then the file shows up as

    docker exec -it 9f5865473027 ls illumina/runs/con/chrX_impute
    ALL.chrX.PAR2.phase3_v5.shapeit2_mvncall_integrated.noSingleton.genotypes.vcf.gz